var eC=Object.defineProperty;var Zg=e=>{throw TypeError(e)};var tC=(e,t,n)=>t in e?eC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>tC(e,typeof t!="symbol"?t+"":t,n),gd=(e,t,n)=>t.has(e)||Zg("Cannot "+n);var j=(e,t,n)=>(gd(e,t,"read from private field"),n?n.call(e):t.get(e)),ve=(e,t,n)=>t.has(e)?Zg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),re=(e,t,n,s)=>(gd(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),Ne=(e,t,n)=>(gd(e,t,"access private method"),n);var Al=(e,t,n,s)=>({set _(o){re(e,t,o,n)},get _(){return j(e,t,s)}});function nC(e,t){for(var n=0;ns[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Kf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yd={exports:{}},Co={},vd={exports:{}},Re={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ey;function rC(){if(ey)return Re;ey=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function b(O,$,fe){this.props=O,this.context=$,this.refs=E,this.updater=fe||C}b.prototype.isReactComponent={},b.prototype.setState=function(O,$){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,$,"setState")},b.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function S(){}S.prototype=b.prototype;function P(O,$,fe){this.props=O,this.context=$,this.refs=E,this.updater=fe||C}var T=P.prototype=new S;T.constructor=P,A(T,b.prototype),T.isPureReactComponent=!0;var R=Array.isArray,F=Object.prototype.hasOwnProperty,U={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function I(O,$,fe){var pe,he={},X=null,be=null;if($!=null)for(pe in $.ref!==void 0&&(be=$.ref),$.key!==void 0&&(X=""+$.key),$)F.call($,pe)&&!H.hasOwnProperty(pe)&&(he[pe]=$[pe]);var _e=arguments.length-2;if(_e===1)he.children=fe;else if(1<_e){for(var me=Array(_e),at=0;at<_e;at++)me[at]=arguments[at+2];he.children=me}if(O&&O.defaultProps)for(pe in _e=O.defaultProps,_e)he[pe]===void 0&&(he[pe]=_e[pe]);return{$$typeof:e,type:O,key:X,ref:be,props:he,_owner:U.current}}function G(O,$){return{$$typeof:e,type:O.type,key:$,ref:O.ref,props:O.props,_owner:O._owner}}function ee(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function de(O){var $={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(fe){return $[fe]})}var Te=/\/+/g;function xe(O,$){return typeof O=="object"&&O!==null&&O.key!=null?de(""+O.key):$.toString(36)}function Z(O,$,fe,pe,he){var X=typeof O;(X==="undefined"||X==="boolean")&&(O=null);var be=!1;if(O===null)be=!0;else switch(X){case"string":case"number":be=!0;break;case"object":switch(O.$$typeof){case e:case t:be=!0}}if(be)return be=O,he=he(be),O=pe===""?"."+xe(be,0):pe,R(he)?(fe="",O!=null&&(fe=O.replace(Te,"$&/")+"/"),Z(he,$,fe,"",function(at){return at})):he!=null&&(ee(he)&&(he=G(he,fe+(!he.key||be&&be.key===he.key?"":(""+he.key).replace(Te,"$&/")+"/")+O)),$.push(he)),1;if(be=0,pe=pe===""?".":pe+":",R(O))for(var _e=0;_e>>1,$=W[O];if(0>>1;Oo(he,z))X<$&&0>o(be,he)?(W[O]=be,W[X]=z,O=X):(W[O]=he,W[pe]=z,O=pe);else if(X<$&&0>o(be,z))W[O]=be,W[X]=z,O=X;else break e}}return ne}function o(W,ne){var z=W.sortIndex-ne.sortIndex;return z!==0?z:W.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],p=[],y=1,v=null,w=3,C=!1,A=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(W){for(var ne=n(p);ne!==null;){if(ne.callback===null)s(p);else if(ne.startTime<=W)s(p),ne.sortIndex=ne.expirationTime,t(f,ne);else break;ne=n(p)}}function R(W){if(E=!1,T(W),!A)if(n(f)!==null)A=!0,Ce(F);else{var ne=n(p);ne!==null&&ie(R,ne.startTime-W)}}function F(W,ne){A=!1,E&&(E=!1,S(I),I=-1),C=!0;var z=w;try{for(T(ne),v=n(f);v!==null&&(!(v.expirationTime>ne)||W&&!de());){var O=v.callback;if(typeof O=="function"){v.callback=null,w=v.priorityLevel;var $=O(v.expirationTime<=ne);ne=e.unstable_now(),typeof $=="function"?v.callback=$:v===n(f)&&s(f),T(ne)}else s(f);v=n(f)}if(v!==null)var fe=!0;else{var pe=n(p);pe!==null&&ie(R,pe.startTime-ne),fe=!1}return fe}finally{v=null,w=z,C=!1}}var U=!1,H=null,I=-1,G=5,ee=-1;function de(){return!(e.unstable_now()-eeW||125O?(W.sortIndex=z,t(p,W),n(f)===null&&W===n(p)&&(E?(S(I),I=-1):E=!0,ie(R,z-O))):(W.sortIndex=$,t(f,W),A||C||(A=!0,Ce(F))),W},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(W){var ne=w;return function(){var z=w;w=ne;try{return W.apply(this,arguments)}finally{w=z}}}})(bd)),bd}var iy;function aC(){return iy||(iy=1,wd.exports=oC()),wd.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var oy;function lC(){if(oy)return Ft;oy=1;var e=Qf(),t=aC();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function w(r){return f.call(v,r)?!0:f.call(y,r)?!1:p.test(r)?v[r]=!0:(y[r]=!0,!1)}function C(r,i,a,u){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return u?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function A(r,i,a,u){if(i===null||typeof i>"u"||C(r,i,a,u))return!0;if(u)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function E(r,i,a,u,h,g,x){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=u,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=g,this.removeEmptyString=x}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){b[r]=new E(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];b[i]=new E(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){b[r]=new E(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){b[r]=new E(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){b[r]=new E(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){b[r]=new E(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){b[r]=new E(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){b[r]=new E(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){b[r]=new E(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function P(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(S,P);b[i]=new E(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(S,P);b[i]=new E(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(S,P);b[i]=new E(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){b[r]=new E(r,1,!1,r.toLowerCase(),null,!1,!1)}),b.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){b[r]=new E(r,1,!1,r.toLowerCase(),null,!0,!0)});function T(r,i,a,u){var h=b.hasOwnProperty(i)?b[i]:null;(h!==null?h.type!==0:u||!(2_||h[x]!==g[_]){var N=` `+h[x].replace(" at new "," at ");return r.displayName&&N.includes("")&&(N=N.replace("",r.displayName)),N}while(1<=x&&0<=_);break}}}finally{fe=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?$(r):""}function he(r){switch(r.tag){case 5:return $(r.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return r=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case H:return"Fragment";case U:return"Portal";case G:return"Profiler";case I:return"StrictMode";case xe:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case de:return(r.displayName||"Context")+".Consumer";case ee:return(r._context.displayName||"Context")+".Provider";case Te:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Ae:return i=r.displayName||null,i!==null?i:X(r.type)||"Memo";case Ce:i=r._payload,r=r._init;try{return X(r(i))}catch{}}return null}function be(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(i);case 8:return i===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function _e(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function me(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function at(r){var i=me(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),u=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(x){u=""+x,g.call(this,x)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(x){u=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Gt(r){r._valueTracker||(r._valueTracker=at(r))}function ht(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),u="";return r&&(u=me(r)?r.checked?"true":"false":r.value),r=u,r!==a?(i.setValue(r),!0):!1}function dn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Yt(r,i){var a=i.checked;return z({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Xt(r,i){var a=i.defaultValue==null?"":i.defaultValue,u=i.checked!=null?i.checked:i.defaultChecked;a=_e(i.value!=null?i.value:a),r._wrapperState={initialChecked:u,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function ke(r,i){i=i.checked,i!=null&&T(r,"checked",i,!1)}function pt(r,i){ke(r,i);var a=_e(i.value),u=i.type;if(a!=null)u==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(u==="submit"||u==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?hn(r,i.type,a):i.hasOwnProperty("defaultValue")&&hn(r,i.type,_e(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function fn(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var u=i.type;if(!(u!=="submit"&&u!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function hn(r,i,a){(i!=="number"||dn(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var ir=Array.isArray;function or(r,i,a,u){if(r=r.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=wa.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Bi(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var Vi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sS=["Webkit","ms","Moz","O"];Object.keys(Vi).forEach(function(r){sS.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Vi[i]=Vi[r]})});function pp(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||Vi.hasOwnProperty(r)&&Vi[r]?(""+i).trim():i+"px"}function mp(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var u=a.indexOf("--")===0,h=pp(a,i[a],u);a==="float"&&(a="cssFloat"),u?r.setProperty(a,h):r[a]=h}}var iS=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ac(r,i){if(i){if(iS[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Pc(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rc=null;function Nc(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var jc=null,Ls=null,Ms=null;function gp(r){if(r=lo(r)){if(typeof jc!="function")throw Error(n(280));var i=r.stateNode;i&&(i=$a(i),jc(r.stateNode,r.type,i))}}function yp(r){Ls?Ms?Ms.push(r):Ms=[r]:Ls=r}function vp(){if(Ls){var r=Ls,i=Ms;if(Ms=Ls=null,gp(r),i)for(r=0;r>>=0,r===0?32:31-(gS(r)/yS|0)|0}var ka=64,Ta=4194304;function Wi(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function _a(r,i){var a=r.pendingLanes;if(a===0)return 0;var u=0,h=r.suspendedLanes,g=r.pingedLanes,x=a&268435455;if(x!==0){var _=x&~h;_!==0?u=Wi(_):(g&=x,g!==0&&(u=Wi(g)))}else x=a&~h,x!==0?u=Wi(x):g!==0&&(u=Wi(g));if(u===0)return 0;if(i!==0&&i!==u&&(i&h)===0&&(h=u&-u,g=i&-i,h>=g||h===16&&(g&4194240)!==0))return i;if((u&4)!==0&&(u|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=u;0a;a++)i.push(r);return i}function Hi(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-pn(i),r[i]=a}function bS(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var u=r.eventTimes;for(r=r.expirationTimes;0=Zi),qp=" ",Kp=!1;function Qp(r,i){switch(r){case"keyup":return GS.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Bs=!1;function XS(r,i){switch(r){case"compositionend":return Gp(i);case"keypress":return i.which!==32?null:(Kp=!0,qp);case"textInput":return r=i.data,r===qp&&Kp?null:r;default:return null}}function JS(r,i){if(Bs)return r==="compositionend"||!Yc&&Qp(r,i)?(r=Vp(),ja=Wc=dr=null,Bs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-r};r=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=nm(a)}}function sm(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?sm(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function im(){for(var r=window,i=dn();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=dn(r.document)}return i}function Zc(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function aE(r){var i=im(),a=r.focusedElem,u=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&sm(a.ownerDocument.documentElement,a)){if(u!==null&&Zc(a)){if(i=u.start,r=u.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,g=Math.min(u.start,h);u=u.end===void 0?g:Math.min(u.end,h),!r.extend&&g>u&&(h=u,u=g,g=h),h=rm(a,g);var x=rm(a,u);h&&x&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==x.node||r.focusOffset!==x.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),g>u?(r.addRange(i),r.extend(x.node,x.offset)):(i.setEnd(x.node,x.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Vs=null,eu=null,ro=null,tu=!1;function om(r,i,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tu||Vs==null||Vs!==dn(u)||(u=Vs,"selectionStart"in u&&Zc(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ro&&no(ro,u)||(ro=u,u=Va(eu,"onSelect"),0Hs||(r.current=hu[Hs],hu[Hs]=null,Hs--)}function Ve(r,i){Hs++,hu[Hs]=r.current,r.current=i}var mr={},bt=pr(mr),jt=pr(!1),Kr=mr;function qs(r,i){var a=r.type.contextTypes;if(!a)return mr;var u=r.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===i)return u.__reactInternalMemoizedMaskedChildContext;var h={},g;for(g in a)h[g]=i[g];return u&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function Ot(r){return r=r.childContextTypes,r!=null}function Wa(){$e(jt),$e(bt)}function bm(r,i,a){if(bt.current!==mr)throw Error(n(168));Ve(bt,i),Ve(jt,a)}function Sm(r,i,a){var u=r.stateNode;if(i=i.childContextTypes,typeof u.getChildContext!="function")return a;u=u.getChildContext();for(var h in u)if(!(h in i))throw Error(n(108,be(r)||"Unknown",h));return z({},a,u)}function Ha(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||mr,Kr=bt.current,Ve(bt,r),Ve(jt,jt.current),!0}function Em(r,i,a){var u=r.stateNode;if(!u)throw Error(n(169));a?(r=Sm(r,i,Kr),u.__reactInternalMemoizedMergedChildContext=r,$e(jt),$e(bt),Ve(bt,r)):$e(jt),Ve(jt,a)}var Wn=null,qa=!1,pu=!1;function Cm(r){Wn===null?Wn=[r]:Wn.push(r)}function xE(r){qa=!0,Cm(r)}function gr(){if(!pu&&Wn!==null){pu=!0;var r=0,i=Ie;try{var a=Wn;for(Ie=1;r>=x,h-=x,Hn=1<<32-pn(i)+h|a<Ee?(ut=ye,ye=null):ut=ye.sibling;var Le=q(M,ye,B[Ee],Y);if(Le===null){ye===null&&(ye=ut);break}r&&ye&&Le.alternate===null&&i(M,ye),D=g(Le,D,Ee),ge===null?ue=Le:ge.sibling=Le,ge=Le,ye=ut}if(Ee===B.length)return a(M,ye),We&&Gr(M,Ee),ue;if(ye===null){for(;EeEe?(ut=ye,ye=null):ut=ye.sibling;var kr=q(M,ye,Le.value,Y);if(kr===null){ye===null&&(ye=ut);break}r&&ye&&kr.alternate===null&&i(M,ye),D=g(kr,D,Ee),ge===null?ue=kr:ge.sibling=kr,ge=kr,ye=ut}if(Le.done)return a(M,ye),We&&Gr(M,Ee),ue;if(ye===null){for(;!Le.done;Ee++,Le=B.next())Le=Q(M,Le.value,Y),Le!==null&&(D=g(Le,D,Ee),ge===null?ue=Le:ge.sibling=Le,ge=Le);return We&&Gr(M,Ee),ue}for(ye=u(M,ye);!Le.done;Ee++,Le=B.next())Le=te(ye,M,Ee,Le.value,Y),Le!==null&&(r&&Le.alternate!==null&&ye.delete(Le.key===null?Ee:Le.key),D=g(Le,D,Ee),ge===null?ue=Le:ge.sibling=Le,ge=Le);return r&&ye.forEach(function(ZE){return i(M,ZE)}),We&&Gr(M,Ee),ue}function Ze(M,D,B,Y){if(typeof B=="object"&&B!==null&&B.type===H&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case F:e:{for(var ue=B.key,ge=D;ge!==null;){if(ge.key===ue){if(ue=B.type,ue===H){if(ge.tag===7){a(M,ge.sibling),D=h(ge,B.props.children),D.return=M,M=D;break e}}else if(ge.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Ce&&Rm(ue)===ge.type){a(M,ge.sibling),D=h(ge,B.props),D.ref=co(M,ge,B),D.return=M,M=D;break e}a(M,ge);break}else i(M,ge);ge=ge.sibling}B.type===H?(D=rs(B.props.children,M.mode,Y,B.key),D.return=M,M=D):(Y=wl(B.type,B.key,B.props,null,M.mode,Y),Y.ref=co(M,D,B),Y.return=M,M=Y)}return x(M);case U:e:{for(ge=B.key;D!==null;){if(D.key===ge)if(D.tag===4&&D.stateNode.containerInfo===B.containerInfo&&D.stateNode.implementation===B.implementation){a(M,D.sibling),D=h(D,B.children||[]),D.return=M,M=D;break e}else{a(M,D);break}else i(M,D);D=D.sibling}D=dd(B,M.mode,Y),D.return=M,M=D}return x(M);case Ce:return ge=B._init,Ze(M,D,ge(B._payload),Y)}if(ir(B))return oe(M,D,B,Y);if(ne(B))return ce(M,D,B,Y);Ya(M,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,D!==null&&D.tag===6?(a(M,D.sibling),D=h(D,B),D.return=M,M=D):(a(M,D),D=ud(B,M.mode,Y),D.return=M,M=D),x(M)):a(M,D)}return Ze}var Ys=Nm(!0),jm=Nm(!1),Xa=pr(null),Ja=null,Xs=null,wu=null;function bu(){wu=Xs=Ja=null}function Su(r){var i=Xa.current;$e(Xa),r._currentValue=i}function Eu(r,i,a){for(;r!==null;){var u=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),r===a)break;r=r.return}}function Js(r,i){Ja=r,wu=Xs=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Dt=!0),r.firstContext=null)}function en(r){var i=r._currentValue;if(wu!==r)if(r={context:r,memoizedValue:i,next:null},Xs===null){if(Ja===null)throw Error(n(308));Xs=r,Ja.dependencies={lanes:0,firstContext:r}}else Xs=Xs.next=r;return i}var Yr=null;function Cu(r){Yr===null?Yr=[r]:Yr.push(r)}function Om(r,i,a,u){var h=i.interleaved;return h===null?(a.next=a,Cu(i)):(a.next=h.next,h.next=a),i.interleaved=a,Kn(r,u)}function Kn(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var yr=!1;function ku(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dm(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Qn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function vr(r,i,a){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(De&2)!==0){var h=u.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),u.pending=i,Kn(r,a)}return h=u.interleaved,h===null?(i.next=i,Cu(u)):(i.next=h.next,h.next=i),u.interleaved=i,Kn(r,a)}function Za(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var u=i.lanes;u&=r.pendingLanes,a|=u,i.lanes=a,Bc(r,a)}}function Lm(r,i){var a=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?h=g=x:g=g.next=x,a=a.next}while(a!==null);g===null?h=g=i:g=g.next=i}else h=g=i;a={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:u.shared,effects:u.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function el(r,i,a,u){var h=r.updateQueue;yr=!1;var g=h.firstBaseUpdate,x=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var N=_,V=N.next;N.next=null,x===null?g=V:x.next=V,x=N;var K=r.alternate;K!==null&&(K=K.updateQueue,_=K.lastBaseUpdate,_!==x&&(_===null?K.firstBaseUpdate=V:_.next=V,K.lastBaseUpdate=N))}if(g!==null){var Q=h.baseState;x=0,K=V=N=null,_=g;do{var q=_.lane,te=_.eventTime;if((u&q)===q){K!==null&&(K=K.next={eventTime:te,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var oe=r,ce=_;switch(q=i,te=a,ce.tag){case 1:if(oe=ce.payload,typeof oe=="function"){Q=oe.call(te,Q,q);break e}Q=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=ce.payload,q=typeof oe=="function"?oe.call(te,Q,q):oe,q==null)break e;Q=z({},Q,q);break e;case 2:yr=!0}}_.callback!==null&&_.lane!==0&&(r.flags|=64,q=h.effects,q===null?h.effects=[_]:q.push(_))}else te={eventTime:te,lane:q,tag:_.tag,payload:_.payload,callback:_.callback,next:null},K===null?(V=K=te,N=Q):K=K.next=te,x|=q;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;q=_,_=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);if(K===null&&(N=Q),h.baseState=N,h.firstBaseUpdate=V,h.lastBaseUpdate=K,i=h.shared.interleaved,i!==null){h=i;do x|=h.lane,h=h.next;while(h!==i)}else g===null&&(h.shared.lanes=0);Zr|=x,r.lanes=x,r.memoizedState=Q}}function Mm(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var u=Ru.transition;Ru.transition={};try{r(!1),i()}finally{Ie=a,Ru.transition=u}}function tg(){return tn().memoizedState}function EE(r,i,a){var u=Sr(r);if(a={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null},ng(r))rg(i,a);else if(a=Om(r,i,a,u),a!==null){var h=Rt();wn(a,r,u,h),sg(a,i,u)}}function CE(r,i,a){var u=Sr(r),h={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null};if(ng(r))rg(i,h);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var x=i.lastRenderedState,_=g(x,a);if(h.hasEagerState=!0,h.eagerState=_,mn(_,x)){var N=i.interleaved;N===null?(h.next=h,Cu(i)):(h.next=N.next,N.next=h),i.interleaved=h;return}}catch{}finally{}a=Om(r,i,h,u),a!==null&&(h=Rt(),wn(a,r,u,h),sg(a,i,u))}}function ng(r){var i=r.alternate;return r===Ke||i!==null&&i===Ke}function rg(r,i){po=rl=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function sg(r,i,a){if((a&4194240)!==0){var u=i.lanes;u&=r.pendingLanes,a|=u,i.lanes=a,Bc(r,a)}}var ol={readContext:en,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},kE={readContext:en,useCallback:function(r,i){return Rn().memoizedState=[r,i===void 0?null:i],r},useContext:en,useEffect:Km,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,sl(4194308,4,Ym.bind(null,i,r),a)},useLayoutEffect:function(r,i){return sl(4194308,4,r,i)},useInsertionEffect:function(r,i){return sl(4,2,r,i)},useMemo:function(r,i){var a=Rn();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var u=Rn();return i=a!==void 0?a(i):i,u.memoizedState=u.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},u.queue=r,r=r.dispatch=EE.bind(null,Ke,r),[u.memoizedState,r]},useRef:function(r){var i=Rn();return r={current:r},i.memoizedState=r},useState:Hm,useDebugValue:Fu,useDeferredValue:function(r){return Rn().memoizedState=r},useTransition:function(){var r=Hm(!1),i=r[0];return r=SE.bind(null,r[1]),Rn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var u=Ke,h=Rn();if(We){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),ct===null)throw Error(n(349));(Jr&30)!==0||Vm(u,i,a)}h.memoizedState=a;var g={value:a,getSnapshot:i};return h.queue=g,Km(zm.bind(null,u,g,r),[r]),u.flags|=2048,yo(9,Um.bind(null,u,g,a,i),void 0,null),a},useId:function(){var r=Rn(),i=ct.identifierPrefix;if(We){var a=qn,u=Hn;a=(u&~(1<<32-pn(u)-1)).toString(32)+a,i=":"+i+"R"+a,a=mo++,0<\/script>",r=r.removeChild(r.firstChild)):typeof u.is=="string"?r=x.createElement(a,{is:u.is}):(r=x.createElement(a),a==="select"&&(x=r,u.multiple?x.multiple=!0:u.size&&(x.size=u.size))):r=x.createElementNS(r,a),r[An]=i,r[ao]=u,Cg(r,i,!1,!1),i.stateNode=r;e:{switch(x=Pc(a,u),a){case"dialog":ze("cancel",r),ze("close",r),h=u;break;case"iframe":case"object":case"embed":ze("load",r),h=u;break;case"video":case"audio":for(h=0;hri&&(i.flags|=128,u=!0,vo(g,!1),i.lanes=4194304)}else{if(!u)if(r=tl(x),r!==null){if(i.flags|=128,u=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),vo(g,!0),g.tail===null&&g.tailMode==="hidden"&&!x.alternate&&!We)return Et(i),null}else 2*Je()-g.renderingStartTime>ri&&a!==1073741824&&(i.flags|=128,u=!0,vo(g,!1),i.lanes=4194304);g.isBackwards?(x.sibling=i.child,i.child=x):(a=g.last,a!==null?a.sibling=x:i.child=x,g.last=x)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=Je(),i.sibling=null,a=qe.current,Ve(qe,u?a&1|2:a&1),i):(Et(i),null);case 22:case 23:return ad(),u=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==u&&(i.flags|=8192),u&&(i.mode&1)!==0?(Wt&1073741824)!==0&&(Et(i),i.subtreeFlags&6&&(i.flags|=8192)):Et(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function OE(r,i){switch(gu(i),i.tag){case 1:return Ot(i.type)&&Wa(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Zs(),$e(jt),$e(bt),Pu(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return _u(i),null;case 13:if($e(qe),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Gs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return $e(qe),null;case 4:return Zs(),null;case 10:return Su(i.type._context),null;case 22:case 23:return ad(),null;case 24:return null;default:return null}}var ul=!1,Ct=!1,DE=typeof WeakSet=="function"?WeakSet:Set,se=null;function ti(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(u){Qe(r,i,u)}else a.current=null}function Gu(r,i,a){try{a()}catch(u){Qe(r,i,u)}}var _g=!1;function LE(r,i){if(au=Ra,r=im(),Zc(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var h=u.anchorOffset,g=u.focusNode;u=u.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var x=0,_=-1,N=-1,V=0,K=0,Q=r,q=null;t:for(;;){for(var te;Q!==a||h!==0&&Q.nodeType!==3||(_=x+h),Q!==g||u!==0&&Q.nodeType!==3||(N=x+u),Q.nodeType===3&&(x+=Q.nodeValue.length),(te=Q.firstChild)!==null;)q=Q,Q=te;for(;;){if(Q===r)break t;if(q===a&&++V===h&&(_=x),q===g&&++K===u&&(N=x),(te=Q.nextSibling)!==null)break;Q=q,q=Q.parentNode}Q=te}a=_===-1||N===-1?null:{start:_,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(lu={focusedElem:r,selectionRange:a},Ra=!1,se=i;se!==null;)if(i=se,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,se=r;else for(;se!==null;){i=se;try{var oe=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(oe!==null){var ce=oe.memoizedProps,Ze=oe.memoizedState,M=i.stateNode,D=M.getSnapshotBeforeUpdate(i.elementType===i.type?ce:yn(i.type,ce),Ze);M.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var B=i.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Y){Qe(i,i.return,Y)}if(r=i.sibling,r!==null){r.return=i.return,se=r;break}se=i.return}return oe=_g,_g=!1,oe}function xo(r,i,a){var u=i.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var h=u=u.next;do{if((h.tag&r)===r){var g=h.destroy;h.destroy=void 0,g!==void 0&&Gu(i,a,g)}h=h.next}while(h!==u)}}function dl(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var u=a.create;a.destroy=u()}a=a.next}while(a!==i)}}function Yu(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function Ag(r){var i=r.alternate;i!==null&&(r.alternate=null,Ag(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[An],delete i[ao],delete i[fu],delete i[yE],delete i[vE])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Pg(r){return r.tag===5||r.tag===3||r.tag===4}function Rg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Pg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Xu(r,i,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=za));else if(u!==4&&(r=r.child,r!==null))for(Xu(r,i,a),r=r.sibling;r!==null;)Xu(r,i,a),r=r.sibling}function Ju(r,i,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(u!==4&&(r=r.child,r!==null))for(Ju(r,i,a),r=r.sibling;r!==null;)Ju(r,i,a),r=r.sibling}var mt=null,vn=!1;function xr(r,i,a){for(a=a.child;a!==null;)Ng(r,i,a),a=a.sibling}function Ng(r,i,a){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Ca,a)}catch{}switch(a.tag){case 5:Ct||ti(a,i);case 6:var u=mt,h=vn;mt=null,xr(r,i,a),mt=u,vn=h,mt!==null&&(vn?(r=mt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):mt.removeChild(a.stateNode));break;case 18:mt!==null&&(vn?(r=mt,a=a.stateNode,r.nodeType===8?du(r.parentNode,a):r.nodeType===1&&du(r,a),Yi(r)):du(mt,a.stateNode));break;case 4:u=mt,h=vn,mt=a.stateNode.containerInfo,vn=!0,xr(r,i,a),mt=u,vn=h;break;case 0:case 11:case 14:case 15:if(!Ct&&(u=a.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){h=u=u.next;do{var g=h,x=g.destroy;g=g.tag,x!==void 0&&((g&2)!==0||(g&4)!==0)&&Gu(a,i,x),h=h.next}while(h!==u)}xr(r,i,a);break;case 1:if(!Ct&&(ti(a,i),u=a.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=a.memoizedProps,u.state=a.memoizedState,u.componentWillUnmount()}catch(_){Qe(a,i,_)}xr(r,i,a);break;case 21:xr(r,i,a);break;case 22:a.mode&1?(Ct=(u=Ct)||a.memoizedState!==null,xr(r,i,a),Ct=u):xr(r,i,a);break;default:xr(r,i,a)}}function jg(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new DE),i.forEach(function(u){var h=WE.bind(null,r,u);a.has(u)||(a.add(u),u.then(h,h))})}}function xn(r,i){var a=i.deletions;if(a!==null)for(var u=0;uh&&(h=x),u&=~g}if(u=h,u=Je()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*FE(u/1960))-u,10r?16:r,br===null)var u=!1;else{if(r=br,br=null,gl=0,(De&6)!==0)throw Error(n(331));var h=De;for(De|=4,se=r.current;se!==null;){var g=se,x=g.child;if((se.flags&16)!==0){var _=g.deletions;if(_!==null){for(var N=0;N<_.length;N++){var V=_[N];for(se=V;se!==null;){var K=se;switch(K.tag){case 0:case 11:case 15:xo(8,K,g)}var Q=K.child;if(Q!==null)Q.return=K,se=Q;else for(;se!==null;){K=se;var q=K.sibling,te=K.return;if(Ag(K),K===V){se=null;break}if(q!==null){q.return=te,se=q;break}se=te}}}var oe=g.alternate;if(oe!==null){var ce=oe.child;if(ce!==null){oe.child=null;do{var Ze=ce.sibling;ce.sibling=null,ce=Ze}while(ce!==null)}}se=g}}if((g.subtreeFlags&2064)!==0&&x!==null)x.return=g,se=x;else e:for(;se!==null;){if(g=se,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:xo(9,g,g.return)}var M=g.sibling;if(M!==null){M.return=g.return,se=M;break e}se=g.return}}var D=r.current;for(se=D;se!==null;){x=se;var B=x.child;if((x.subtreeFlags&2064)!==0&&B!==null)B.return=x,se=B;else e:for(x=D;se!==null;){if(_=se,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:dl(9,_)}}catch(ue){Qe(_,_.return,ue)}if(_===x){se=null;break e}var Y=_.sibling;if(Y!==null){Y.return=_.return,se=Y;break e}se=_.return}}if(De=h,gr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(Ca,r)}catch{}u=!0}return u}finally{Ie=a,nn.transition=i}}return!1}function Wg(r,i,a){i=ei(a,i),i=lg(r,i,1),r=vr(r,i,1),i=Rt(),r!==null&&(Hi(r,1,i),Mt(r,i))}function Qe(r,i,a){if(r.tag===3)Wg(r,r,a);else for(;i!==null;){if(i.tag===3){Wg(i,r,a);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(wr===null||!wr.has(u))){r=ei(a,r),r=cg(i,r,1),i=vr(i,r,1),r=Rt(),i!==null&&(Hi(i,1,r),Mt(i,r));break}}i=i.return}}function zE(r,i,a){var u=r.pingCache;u!==null&&u.delete(i),i=Rt(),r.pingedLanes|=r.suspendedLanes&a,ct===r&&(gt&a)===a&&(it===4||it===3&&(gt&130023424)===gt&&500>Je()-td?ts(r,0):ed|=a),Mt(r,i)}function Hg(r,i){i===0&&((r.mode&1)===0?i=1:(i=Ta,Ta<<=1,(Ta&130023424)===0&&(Ta=4194304)));var a=Rt();r=Kn(r,i),r!==null&&(Hi(r,i,a),Mt(r,a))}function $E(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Hg(r,a)}function WE(r,i){var a=0;switch(r.tag){case 13:var u=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:u=r.stateNode;break;default:throw Error(n(314))}u!==null&&u.delete(i),Hg(r,a)}var qg;qg=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||jt.current)Dt=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return Dt=!1,NE(r,i,a);Dt=(r.flags&131072)!==0}else Dt=!1,We&&(i.flags&1048576)!==0&&km(i,Qa,i.index);switch(i.lanes=0,i.tag){case 2:var u=i.type;cl(r,i),r=i.pendingProps;var h=qs(i,bt.current);Js(i,a),h=ju(null,i,u,r,h,a);var g=Ou();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Ot(u)?(g=!0,Ha(i)):g=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,ku(i),h.updater=al,i.stateNode=h,h._reactInternals=i,Bu(i,u,r,a),i=$u(null,i,u,!0,g,a)):(i.tag=0,We&&g&&mu(i),Pt(null,i,h,a),i=i.child),i;case 16:u=i.elementType;e:{switch(cl(r,i),r=i.pendingProps,h=u._init,u=h(u._payload),i.type=u,h=i.tag=qE(u),r=yn(u,r),h){case 0:i=zu(null,i,u,r,a);break e;case 1:i=vg(null,i,u,r,a);break e;case 11:i=hg(null,i,u,r,a);break e;case 14:i=pg(null,i,u,yn(u.type,r),a);break e}throw Error(n(306,u,""))}return i;case 0:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),zu(r,i,u,h,a);case 1:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),vg(r,i,u,h,a);case 3:e:{if(xg(i),r===null)throw Error(n(387));u=i.pendingProps,g=i.memoizedState,h=g.element,Dm(r,i),el(i,u,null,a);var x=i.memoizedState;if(u=x.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){h=ei(Error(n(423)),i),i=wg(r,i,u,a,h);break e}else if(u!==h){h=ei(Error(n(424)),i),i=wg(r,i,u,a,h);break e}else for($t=hr(i.stateNode.containerInfo.firstChild),zt=i,We=!0,gn=null,a=jm(i,null,u,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Gs(),u===h){i=Gn(r,i,a);break e}Pt(r,i,u,a)}i=i.child}return i;case 5:return Fm(i),r===null&&vu(i),u=i.type,h=i.pendingProps,g=r!==null?r.memoizedProps:null,x=h.children,cu(u,h)?x=null:g!==null&&cu(u,g)&&(i.flags|=32),yg(r,i),Pt(r,i,x,a),i.child;case 6:return r===null&&vu(i),null;case 13:return bg(r,i,a);case 4:return Tu(i,i.stateNode.containerInfo),u=i.pendingProps,r===null?i.child=Ys(i,null,u,a):Pt(r,i,u,a),i.child;case 11:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),hg(r,i,u,h,a);case 7:return Pt(r,i,i.pendingProps,a),i.child;case 8:return Pt(r,i,i.pendingProps.children,a),i.child;case 12:return Pt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(u=i.type._context,h=i.pendingProps,g=i.memoizedProps,x=h.value,Ve(Xa,u._currentValue),u._currentValue=x,g!==null)if(mn(g.value,x)){if(g.children===h.children&&!jt.current){i=Gn(r,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var _=g.dependencies;if(_!==null){x=g.child;for(var N=_.firstContext;N!==null;){if(N.context===u){if(g.tag===1){N=Qn(-1,a&-a),N.tag=2;var V=g.updateQueue;if(V!==null){V=V.shared;var K=V.pending;K===null?N.next=N:(N.next=K.next,K.next=N),V.pending=N}}g.lanes|=a,N=g.alternate,N!==null&&(N.lanes|=a),Eu(g.return,a,i),_.lanes|=a;break}N=N.next}}else if(g.tag===10)x=g.type===i.type?null:g.child;else if(g.tag===18){if(x=g.return,x===null)throw Error(n(341));x.lanes|=a,_=x.alternate,_!==null&&(_.lanes|=a),Eu(x,a,i),x=g.sibling}else x=g.child;if(x!==null)x.return=g;else for(x=g;x!==null;){if(x===i){x=null;break}if(g=x.sibling,g!==null){g.return=x.return,x=g;break}x=x.return}g=x}Pt(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,u=i.pendingProps.children,Js(i,a),h=en(h),u=u(h),i.flags|=1,Pt(r,i,u,a),i.child;case 14:return u=i.type,h=yn(u,i.pendingProps),h=yn(u.type,h),pg(r,i,u,h,a);case 15:return mg(r,i,i.type,i.pendingProps,a);case 17:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),cl(r,i),i.tag=1,Ot(u)?(r=!0,Ha(i)):r=!1,Js(i,a),og(i,u,h),Bu(i,u,h,a),$u(null,i,u,!0,r,a);case 19:return Eg(r,i,a);case 22:return gg(r,i,a)}throw Error(n(156,i.tag))};function Kg(r,i){return Tp(r,i)}function HE(r,i,a,u){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(r,i,a,u){return new HE(r,i,a,u)}function cd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function qE(r){if(typeof r=="function")return cd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Te)return 11;if(r===Ae)return 14}return 2}function Cr(r,i){var a=r.alternate;return a===null?(a=rn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function wl(r,i,a,u,h,g){var x=2;if(u=r,typeof r=="function")cd(r)&&(x=1);else if(typeof r=="string")x=5;else e:switch(r){case H:return rs(a.children,h,g,i);case I:x=8,h|=8;break;case G:return r=rn(12,a,i,h|2),r.elementType=G,r.lanes=g,r;case xe:return r=rn(13,a,i,h),r.elementType=xe,r.lanes=g,r;case Z:return r=rn(19,a,i,h),r.elementType=Z,r.lanes=g,r;case ie:return bl(a,h,g,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ee:x=10;break e;case de:x=9;break e;case Te:x=11;break e;case Ae:x=14;break e;case Ce:x=16,u=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=rn(x,a,i,h),i.elementType=r,i.type=u,i.lanes=g,i}function rs(r,i,a,u){return r=rn(7,r,u,i),r.lanes=a,r}function bl(r,i,a,u){return r=rn(22,r,u,i),r.elementType=ie,r.lanes=a,r.stateNode={isHidden:!1},r}function ud(r,i,a){return r=rn(6,r,null,i),r.lanes=a,r}function dd(r,i,a){return i=rn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function KE(r,i,a,u,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ic(0),this.expirationTimes=Ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ic(0),this.identifierPrefix=u,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function fd(r,i,a,u,h,g,x,_,N){return r=new KE(r,i,a,_,N),i===1?(i=1,g===!0&&(i|=8)):i=0,g=rn(3,null,null,i),r.current=g,g.stateNode=r,g.memoizedState={element:u,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},ku(g),r}function QE(r,i,a){var u=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xd.exports=lC(),xd.exports}var ly;function cC(){if(ly)return Pl;ly=1;var e=ix();return Pl.createRoot=e.createRoot,Pl.hydrateRoot=e.hydrateRoot,Pl}var uC=cC();const dC=Kf(uC),fC=20,hC=1e6,tr={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Sd=0;function pC(){return Sd=(Sd+1)%Number.MAX_VALUE,Sd.toString()}const Ed=new Map,cy=e=>{if(Ed.has(e))return;const t=setTimeout(()=>{Ed.delete(e),Io({type:tr.REMOVE_TOAST,toastId:e})},hC);Ed.set(e,t)},mC=(e,t)=>{switch(t.type){case tr.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,fC)};case tr.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case tr.DISMISS_TOAST:{const{toastId:n}=t;return n?cy(n):e.toasts.forEach(s=>{cy(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case tr.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},zl=[];let $l={toasts:[]};function Io(e){$l=mC($l,e),zl.forEach(t=>{t($l)})}function gC({...e}){const t=pC(),n=o=>Io({type:tr.UPDATE_TOAST,toast:{...o,id:t}}),s=()=>Io({type:tr.DISMISS_TOAST,toastId:t});return Io({type:tr.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||s()}}}),{id:t,dismiss:s,update:n}}function yC(){const[e,t]=k.useState($l);return k.useEffect(()=>(zl.push(t),()=>{const n=zl.indexOf(t);n>-1&&zl.splice(n,1)}),[e]),{...e,toast:gC,dismiss:n=>Io({type:tr.DISMISS_TOAST,toastId:n})}}var Gf=ix();const vC=Kf(Gf);function Ht(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function uy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Yf(...e){return t=>{let n=!1;const s=e.map(o=>{const l=uy(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o{var S;const{scope:w,children:C,...A}=v,E=((S=w==null?void 0:w[e])==null?void 0:S[f])||d,b=k.useMemo(()=>A,Object.values(A));return m.jsx(E.Provider,{value:b,children:C})};p.displayName=l+"Provider";function y(v,w){var E;const C=((E=w==null?void 0:w[e])==null?void 0:E[f])||d,A=k.useContext(C);if(A)return A;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${l}\``)}return[p,y]}const o=()=>{const l=n.map(c=>k.createContext(c));return function(d){const f=(d==null?void 0:d[e])||l;return k.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[s,xC(o,...t)]}function xC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const c=s.reduce((d,{useScope:f,scopeName:p})=>{const v=f(l)[`__scope${p}`];return{...d,...v}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function dy(e){const t=wC(e),n=k.forwardRef((s,o)=>{const{children:l,...c}=s,d=k.Children.toArray(l),f=d.find(SC);if(f){const p=f.props.children,y=d.map(v=>v===f?k.Children.count(p)>1?k.Children.only(null):k.isValidElement(p)?p.props.children:null:v);return m.jsx(t,{...c,ref:o,children:k.isValidElement(p)?k.cloneElement(p,void 0,y):null})}return m.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function wC(e){const t=k.forwardRef((n,s)=>{const{children:o,...l}=n;if(k.isValidElement(o)){const c=CC(o),d=EC(l,o.props);return o.type!==k.Fragment&&(d.ref=s?Yf(s,c):c),k.cloneElement(o,d)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bC=Symbol("radix.slottable");function SC(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bC}function EC(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function CC(e){var s,o;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kC(e){const t=e+"CollectionProvider",[n,s]=ox(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=E=>{const{scope:b,children:S}=E,P=ln.useRef(null),T=ln.useRef(new Map).current;return m.jsx(o,{scope:b,itemMap:T,collectionRef:P,children:S})};c.displayName=t;const d=e+"CollectionSlot",f=dy(d),p=ln.forwardRef((E,b)=>{const{scope:S,children:P}=E,T=l(d,S),R=ks(b,T.collectionRef);return m.jsx(f,{ref:R,children:P})});p.displayName=d;const y=e+"CollectionItemSlot",v="data-radix-collection-item",w=dy(y),C=ln.forwardRef((E,b)=>{const{scope:S,children:P,...T}=E,R=ln.useRef(null),F=ks(b,R),U=l(y,S);return ln.useEffect(()=>(U.itemMap.set(R,{ref:R,...T}),()=>void U.itemMap.delete(R))),m.jsx(w,{[v]:"",ref:F,children:P})});C.displayName=y;function A(E){const b=l(e+"CollectionConsumer",E);return ln.useCallback(()=>{const P=b.collectionRef.current;if(!P)return[];const T=Array.from(P.querySelectorAll(`[${v}]`));return Array.from(b.itemMap.values()).sort((U,H)=>T.indexOf(U.ref.current)-T.indexOf(H.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:p,ItemSlot:C},A,s]}function TC(e){const t=_C(e),n=k.forwardRef((s,o)=>{const{children:l,...c}=s,d=k.Children.toArray(l),f=d.find(PC);if(f){const p=f.props.children,y=d.map(v=>v===f?k.Children.count(p)>1?k.Children.only(null):k.isValidElement(p)?p.props.children:null:v);return m.jsx(t,{...c,ref:o,children:k.isValidElement(p)?k.cloneElement(p,void 0,y):null})}return m.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function _C(e){const t=k.forwardRef((n,s)=>{const{children:o,...l}=n;if(k.isValidElement(o)){const c=NC(o),d=RC(l,o.props);return o.type!==k.Fragment&&(d.ref=s?Yf(s,c):c),k.cloneElement(o,d)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AC=Symbol("radix.slottable");function PC(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AC}function RC(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function NC(e){var s,o;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Un=jC.reduce((e,t)=>{const n=TC(`Primitive.${t}`),s=k.forwardRef((o,l)=>{const{asChild:c,...d}=o,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function ax(e,t){e&&Gf.flushSync(()=>e.dispatchEvent(t))}function Ts(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function OC(e,t=globalThis==null?void 0:globalThis.document){const n=Ts(e);k.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var DC="DismissableLayer",Xd="dismissableLayer.update",LC="dismissableLayer.pointerDownOutside",MC="dismissableLayer.focusOutside",fy,lx=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cx=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,p=k.useContext(lx),[y,v]=k.useState(null),w=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=k.useState({}),A=ks(t,H=>v(H)),E=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=E.indexOf(b),P=y?E.indexOf(y):-1,T=p.layersWithOutsidePointerEventsDisabled.size>0,R=P>=S,F=IC(H=>{const I=H.target,G=[...p.branches].some(ee=>ee.contains(I));!R||G||(o==null||o(H),c==null||c(H),H.defaultPrevented||d==null||d())},w),U=BC(H=>{const I=H.target;[...p.branches].some(ee=>ee.contains(I))||(l==null||l(H),c==null||c(H),H.defaultPrevented||d==null||d())},w);return OC(H=>{P===p.layers.size-1&&(s==null||s(H),!H.defaultPrevented&&d&&(H.preventDefault(),d()))},w),k.useEffect(()=>{if(y)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(fy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),hy(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=fy)}},[y,w,n,p]),k.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),hy())},[y,p]),k.useEffect(()=>{const H=()=>C({});return document.addEventListener(Xd,H),()=>document.removeEventListener(Xd,H)},[]),m.jsx(Un.div,{...f,ref:A,style:{pointerEvents:T?R?"auto":"none":void 0,...e.style},onFocusCapture:Ht(e.onFocusCapture,U.onFocusCapture),onBlurCapture:Ht(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:Ht(e.onPointerDownCapture,F.onPointerDownCapture)})});cx.displayName=DC;var FC="DismissableLayerBranch",ux=k.forwardRef((e,t)=>{const n=k.useContext(lx),s=k.useRef(null),o=ks(t,s);return k.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),m.jsx(Un.div,{...e,ref:o})});ux.displayName=FC;function IC(e,t=globalThis==null?void 0:globalThis.document){const n=Ts(e),s=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){dx(LC,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function BC(e,t=globalThis==null?void 0:globalThis.document){const n=Ts(e),s=k.useRef(!1);return k.useEffect(()=>{const o=l=>{l.target&&!s.current&&dx(MC,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function hy(){const e=new CustomEvent(Xd);document.dispatchEvent(e)}function dx(e,t,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?ax(o,l):o.dispatchEvent(l)}var VC=cx,UC=ux,qo=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},zC="Portal",fx=k.forwardRef((e,t)=>{var d;const{container:n,...s}=e,[o,l]=k.useState(!1);qo(()=>l(!0),[]);const c=n||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?vC.createPortal(m.jsx(Un.div,{...s,ref:t}),c):null});fx.displayName=zC;function $C(e,t){return k.useReducer((n,s)=>t[n][s]??n,e)}var hx=e=>{const{present:t,children:n}=e,s=WC(t),o=typeof n=="function"?n({present:s.isPresent}):k.Children.only(n),l=ks(s.ref,HC(o));return typeof n=="function"||s.isPresent?k.cloneElement(o,{ref:l}):null};hx.displayName="Presence";function WC(e){const[t,n]=k.useState(),s=k.useRef(null),o=k.useRef(e),l=k.useRef("none"),c=e?"mounted":"unmounted",[d,f]=$C(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const p=Rl(s.current);l.current=d==="mounted"?p:"none"},[d]),qo(()=>{const p=s.current,y=o.current;if(y!==e){const w=l.current,C=Rl(p);e?f("MOUNT"):C==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(y&&w!==C?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),qo(()=>{if(t){let p;const y=t.ownerDocument.defaultView??window,v=C=>{const E=Rl(s.current).includes(CSS.escape(C.animationName));if(C.target===t&&E&&(f("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",p=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},w=C=>{C.target===t&&(l.current=Rl(s.current))};return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{y.clearTimeout(p),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:k.useCallback(p=>{s.current=p?getComputedStyle(p):null,n(p)},[])}}function Rl(e){return(e==null?void 0:e.animationName)||"none"}function HC(e){var s,o;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qC=sx[" useInsertionEffect ".trim().toString()]||qo;function KC({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[o,l,c]=QC({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:o;{const y=k.useRef(e!==void 0);k.useEffect(()=>{const v=y.current;v!==d&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=d},[d,s])}const p=k.useCallback(y=>{var v;if(d){const w=GC(y)?y(e):y;w!==e&&((v=c.current)==null||v.call(c,w))}else l(y)},[d,e,l,c]);return[f,p]}function QC({defaultProp:e,onChange:t}){const[n,s]=k.useState(e),o=k.useRef(n),l=k.useRef(t);return qC(()=>{l.current=t},[t]),k.useEffect(()=>{var c;o.current!==n&&((c=l.current)==null||c.call(l,n),o.current=n)},[n,o]),[n,s,l]}function GC(e){return typeof e=="function"}var YC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),XC="VisuallyHidden",Xf=k.forwardRef((e,t)=>m.jsx(Un.span,{...e,ref:t,style:{...YC,...e.style}}));Xf.displayName=XC;var Jf="ToastProvider",[Zf,JC,ZC]=kC("Toast"),[px]=ox("Toast",[ZC]),[e2,pc]=px(Jf),mx=e=>{const{__scopeToast:t,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:c}=e,[d,f]=k.useState(null),[p,y]=k.useState(0),v=k.useRef(!1),w=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Jf}\`. Expected non-empty \`string\`.`),m.jsx(Zf.Provider,{scope:t,children:m.jsx(e2,{scope:t,label:n,duration:s,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:k.useCallback(()=>y(C=>C+1),[]),onToastRemove:k.useCallback(()=>y(C=>C-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:w,children:c})})};mx.displayName=Jf;var gx="ToastViewport",t2=["F8"],Jd="toast.viewportPause",Zd="toast.viewportResume",yx=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:s=t2,label:o="Notifications ({hotkey})",...l}=e,c=pc(gx,n),d=JC(n),f=k.useRef(null),p=k.useRef(null),y=k.useRef(null),v=k.useRef(null),w=ks(t,v,c.onViewportChange),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=c.toastCount>0;k.useEffect(()=>{const b=S=>{var T;s.length!==0&&s.every(R=>S[R]||S.code===R)&&((T=v.current)==null||T.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[s]),k.useEffect(()=>{const b=f.current,S=v.current;if(A&&b&&S){const P=()=>{if(!c.isClosePausedRef.current){const U=new CustomEvent(Jd);S.dispatchEvent(U),c.isClosePausedRef.current=!0}},T=()=>{if(c.isClosePausedRef.current){const U=new CustomEvent(Zd);S.dispatchEvent(U),c.isClosePausedRef.current=!1}},R=U=>{!b.contains(U.relatedTarget)&&T()},F=()=>{b.contains(document.activeElement)||T()};return b.addEventListener("focusin",P),b.addEventListener("focusout",R),b.addEventListener("pointermove",P),b.addEventListener("pointerleave",F),window.addEventListener("blur",P),window.addEventListener("focus",T),()=>{b.removeEventListener("focusin",P),b.removeEventListener("focusout",R),b.removeEventListener("pointermove",P),b.removeEventListener("pointerleave",F),window.removeEventListener("blur",P),window.removeEventListener("focus",T)}}},[A,c.isClosePausedRef]);const E=k.useCallback(({tabbingDirection:b})=>{const P=d().map(T=>{const R=T.ref.current,F=[R,...p2(R)];return b==="forwards"?F:F.reverse()});return(b==="forwards"?P.reverse():P).flat()},[d]);return k.useEffect(()=>{const b=v.current;if(b){const S=P=>{var F,U,H;const T=P.altKey||P.ctrlKey||P.metaKey;if(P.key==="Tab"&&!T){const I=document.activeElement,G=P.shiftKey;if(P.target===b&&G){(F=p.current)==null||F.focus();return}const Te=E({tabbingDirection:G?"backwards":"forwards"}),xe=Te.findIndex(Z=>Z===I);Cd(Te.slice(xe+1))?P.preventDefault():G?(U=p.current)==null||U.focus():(H=y.current)==null||H.focus()}};return b.addEventListener("keydown",S),()=>b.removeEventListener("keydown",S)}},[d,E]),m.jsxs(UC,{ref:f,role:"region","aria-label":o.replace("{hotkey}",C),tabIndex:-1,style:{pointerEvents:A?void 0:"none"},children:[A&&m.jsx(ef,{ref:p,onFocusFromOutsideViewport:()=>{const b=E({tabbingDirection:"forwards"});Cd(b)}}),m.jsx(Zf.Slot,{scope:n,children:m.jsx(Un.ol,{tabIndex:-1,...l,ref:w})}),A&&m.jsx(ef,{ref:y,onFocusFromOutsideViewport:()=>{const b=E({tabbingDirection:"backwards"});Cd(b)}})]})});yx.displayName=gx;var vx="ToastFocusProxy",ef=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:s,...o}=e,l=pc(vx,n);return m.jsx(Xf,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:c=>{var p;const d=c.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&s()}})});ef.displayName=vx;var aa="Toast",n2="toast.swipeStart",r2="toast.swipeMove",s2="toast.swipeCancel",i2="toast.swipeEnd",xx=k.forwardRef((e,t)=>{const{forceMount:n,open:s,defaultOpen:o,onOpenChange:l,...c}=e,[d,f]=KC({prop:s,defaultProp:o??!0,onChange:l,caller:aa});return m.jsx(hx,{present:n||d,children:m.jsx(l2,{open:d,...c,ref:t,onClose:()=>f(!1),onPause:Ts(e.onPause),onResume:Ts(e.onResume),onSwipeStart:Ht(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ht(e.onSwipeMove,p=>{const{x:y,y:v}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:Ht(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ht(e.onSwipeEnd,p=>{const{x:y,y:v}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),f(!1)})})})});xx.displayName=aa;var[o2,a2]=px(aa,{onClose(){}}),l2=k.forwardRef((e,t)=>{const{__scopeToast:n,type:s="foreground",duration:o,open:l,onClose:c,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:y,onSwipeMove:v,onSwipeCancel:w,onSwipeEnd:C,...A}=e,E=pc(aa,n),[b,S]=k.useState(null),P=ks(t,Z=>S(Z)),T=k.useRef(null),R=k.useRef(null),F=o||E.duration,U=k.useRef(0),H=k.useRef(F),I=k.useRef(0),{onToastAdd:G,onToastRemove:ee}=E,de=Ts(()=>{var Ae;(b==null?void 0:b.contains(document.activeElement))&&((Ae=E.viewport)==null||Ae.focus()),c()}),Te=k.useCallback(Z=>{!Z||Z===1/0||(window.clearTimeout(I.current),U.current=new Date().getTime(),I.current=window.setTimeout(de,Z))},[de]);k.useEffect(()=>{const Z=E.viewport;if(Z){const Ae=()=>{Te(H.current),p==null||p()},Ce=()=>{const ie=new Date().getTime()-U.current;H.current=H.current-ie,window.clearTimeout(I.current),f==null||f()};return Z.addEventListener(Jd,Ce),Z.addEventListener(Zd,Ae),()=>{Z.removeEventListener(Jd,Ce),Z.removeEventListener(Zd,Ae)}}},[E.viewport,F,f,p,Te]),k.useEffect(()=>{l&&!E.isClosePausedRef.current&&Te(F)},[l,F,E.isClosePausedRef,Te]),k.useEffect(()=>(G(),()=>ee()),[G,ee]);const xe=k.useMemo(()=>b?Tx(b):null,[b]);return E.viewport?m.jsxs(m.Fragment,{children:[xe&&m.jsx(c2,{__scopeToast:n,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:xe}),m.jsx(o2,{scope:n,onClose:de,children:Gf.createPortal(m.jsx(Zf.ItemSlot,{scope:n,children:m.jsx(VC,{asChild:!0,onEscapeKeyDown:Ht(d,()=>{E.isFocusedToastEscapeKeyDownRef.current||de(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(Un.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":E.swipeDirection,...A,ref:P,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ht(e.onKeyDown,Z=>{Z.key==="Escape"&&(d==null||d(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,de()))}),onPointerDown:Ht(e.onPointerDown,Z=>{Z.button===0&&(T.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:Ht(e.onPointerMove,Z=>{if(!T.current)return;const Ae=Z.clientX-T.current.x,Ce=Z.clientY-T.current.y,ie=!!R.current,W=["left","right"].includes(E.swipeDirection),ne=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,z=W?ne(0,Ae):0,O=W?0:ne(0,Ce),$=Z.pointerType==="touch"?10:2,fe={x:z,y:O},pe={originalEvent:Z,delta:fe};ie?(R.current=fe,Nl(r2,v,pe,{discrete:!1})):py(fe,E.swipeDirection,$)?(R.current=fe,Nl(n2,y,pe,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(Ae)>$||Math.abs(Ce)>$)&&(T.current=null)}),onPointerUp:Ht(e.onPointerUp,Z=>{const Ae=R.current,Ce=Z.target;if(Ce.hasPointerCapture(Z.pointerId)&&Ce.releasePointerCapture(Z.pointerId),R.current=null,T.current=null,Ae){const ie=Z.currentTarget,W={originalEvent:Z,delta:Ae};py(Ae,E.swipeDirection,E.swipeThreshold)?Nl(i2,C,W,{discrete:!0}):Nl(s2,w,W,{discrete:!0}),ie.addEventListener("click",ne=>ne.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),c2=e=>{const{__scopeToast:t,children:n,...s}=e,o=pc(aa,t),[l,c]=k.useState(!1),[d,f]=k.useState(!1);return f2(()=>c(!0)),k.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:m.jsx(fx,{asChild:!0,children:m.jsx(Xf,{...s,children:l&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},u2="ToastTitle",wx=k.forwardRef((e,t)=>{const{__scopeToast:n,...s}=e;return m.jsx(Un.div,{...s,ref:t})});wx.displayName=u2;var d2="ToastDescription",bx=k.forwardRef((e,t)=>{const{__scopeToast:n,...s}=e;return m.jsx(Un.div,{...s,ref:t})});bx.displayName=d2;var Sx="ToastAction",Ex=k.forwardRef((e,t)=>{const{altText:n,...s}=e;return n.trim()?m.jsx(kx,{altText:n,asChild:!0,children:m.jsx(eh,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sx}\`. Expected non-empty \`string\`.`),null)});Ex.displayName=Sx;var Cx="ToastClose",eh=k.forwardRef((e,t)=>{const{__scopeToast:n,...s}=e,o=a2(Cx,n);return m.jsx(kx,{asChild:!0,children:m.jsx(Un.button,{type:"button",...s,ref:t,onClick:Ht(e.onClick,o.onClose)})})});eh.displayName=Cx;var kx=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:s,...o}=e;return m.jsx(Un.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:t})});function Tx(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),h2(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const c=s.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Tx(s))}}),t}function Nl(e,t,n,{discrete:s}){const o=n.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?ax(o,l):o.dispatchEvent(l)}var py=(e,t,n=0)=>{const s=Math.abs(e.x),o=Math.abs(e.y),l=s>o;return t==="left"||t==="right"?l&&s>n:!l&&o>n};function f2(e=()=>{}){const t=Ts(e);qo(()=>{let n=0,s=0;return n=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(s)}},[t])}function h2(e){return e.nodeType===e.ELEMENT_NODE}function p2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var m2=mx,_x=yx,Ax=xx,Px=wx,Rx=bx,Nx=Ex,jx=eh;function Ox(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,gy=Dx,g2=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return gy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(p=>{const y=n==null?void 0:n[p],v=l==null?void 0:l[p];if(y===null)return null;const w=my(y)||my(v);return o[p][w]}),d=n&&Object.entries(n).reduce((p,y)=>{let[v,w]=y;return w===void 0||(p[v]=w),p},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((p,y)=>{let{class:v,className:w,...C}=y;return Object.entries(C).every(A=>{let[E,b]=A;return Array.isArray(b)?b.includes({...l,...d}[E]):{...l,...d}[E]===b})?[...p,v,w]:p},[]);return gy(e,c,f,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const y2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lx=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var v2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const x2=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:c,...d},f)=>k.createElement("svg",{ref:f,...v2,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Lx("lucide",o),...d},[...c.map(([p,y])=>k.createElement(p,y)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kn=(e,t)=>{const n=k.forwardRef(({className:s,...o},l)=>k.createElement(x2,{ref:l,iconNode:t,className:Lx(`lucide-${y2(e)}`,s),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const w2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],th=kn("ArrowRight",w2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const b2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],S2=kn("ArrowUp",b2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const E2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],C2=kn("ChevronRight",E2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],T2=kn("CircleCheck",k2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _2=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Mx=kn("Download",_2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A2=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],P2=kn("FileText",A2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const R2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],N2=kn("House",R2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const j2=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],O2=kn("Mail",j2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const D2=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],L2=kn("Phone",D2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const M2=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],F2=kn("Play",M2);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],B2=kn("X",I2),V2=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s({classGroupId:e,validator:t}),Fx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ec="-",yy=[],z2="arbitrary..",$2=e=>{const t=H2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return W2(c);const d=c.split(ec),f=d[0]===""&&d.length>1?1:0;return Ix(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=s[c],p=n[c];return f?p?V2(p,f):f:p||yy}return n[c]||yy}}},Ix=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const p=Ix(e,t+1,l);if(p)return p}const c=n.validators;if(c===null)return;const d=t===0?e.join(ec):e.slice(t).join(ec),f=c.length;for(let p=0;pe.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?z2+s:void 0})(),H2=e=>{const{theme:t,classGroups:n}=e;return q2(n,t)},q2=(e,t)=>{const n=Fx();for(const s in e){const o=e[s];nh(o,n,s,t)}return n},nh=(e,t,n,s)=>{const o=e.length;for(let l=0;l{if(typeof e=="string"){Q2(e,t,n);return}if(typeof e=="function"){G2(e,t,n,s);return}Y2(e,t,n,s)},Q2=(e,t,n)=>{const s=e===""?t:Bx(t,e);s.classGroupId=n},G2=(e,t,n,s)=>{if(X2(e)){nh(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(U2(n,e))},Y2=(e,t,n,s)=>{const o=Object.entries(e),l=o.length;for(let c=0;c{let n=e;const s=t.split(ec),o=s.length;for(let l=0;l"isThemeGetter"in e&&e.isThemeGetter===!0,J2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const o=(l,c)=>{n[l]=c,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=s[l])!==void 0)return o(l,c),c},set(l,c){l in n?n[l]=c:o(l,c)}}},tf="!",vy=":",Z2=[],xy=(e,t,n,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),ek=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=o=>{const l=[];let c=0,d=0,f=0,p;const y=o.length;for(let E=0;Ef?p-f:void 0;return xy(l,C,w,A)};if(t){const o=t+vy,l=s;s=c=>c.startsWith(o)?l(c.slice(o.length)):xy(Z2,!1,c,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},tk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l0&&(o.sort(),s.push(...o),o=[]),s.push(c)):o.push(c)}return o.length>0&&(o.sort(),s.push(...o)),s}},nk=e=>({cache:J2(e.cacheSize),parseClassName:ek(e),sortModifiers:tk(e),...$2(e)}),rk=/\s+/,sk=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=t,c=[],d=e.trim().split(rk);let f="";for(let p=d.length-1;p>=0;p-=1){const y=d[p],{isExternal:v,modifiers:w,hasImportantModifier:C,baseClassName:A,maybePostfixModifierPosition:E}=n(y);if(v){f=y+(f.length>0?" "+f:f);continue}let b=!!E,S=s(b?A.substring(0,E):A);if(!S){if(!b){f=y+(f.length>0?" "+f:f);continue}if(S=s(A),!S){f=y+(f.length>0?" "+f:f);continue}b=!1}const P=w.length===0?"":w.length===1?w[0]:l(w).join(":"),T=C?P+tf:P,R=T+S;if(c.indexOf(R)>-1)continue;c.push(R);const F=o(S,b);for(let U=0;U0?" "+f:f)}return f},ik=(...e)=>{let t=0,n,s,o="";for(;t{if(typeof e=="string")return e;let t,n="";for(let s=0;s{let n,s,o,l;const c=f=>{const p=t.reduce((y,v)=>v(y),e());return n=nk(p),s=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const p=s(f);if(p)return p;const y=sk(f,n);return o(f,y),y};return l=c,(...f)=>l(ik(...f))},ak=[],ot=e=>{const t=n=>n[e]||ak;return t.isThemeGetter=!0,t},Ux=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lk=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ck=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tr=e=>lk.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),_r=e=>!!e&&Number.isInteger(Number(e)),kd=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),Xn=e=>ck.test(e),$x=()=>!0,pk=e=>uk.test(e)&&!dk.test(e),rh=()=>!1,mk=e=>fk.test(e),gk=e=>hk.test(e),yk=e=>!ae(e)&&!le(e),vk=e=>$r(e,qx,rh),ae=e=>Ux.test(e),ss=e=>$r(e,Kx,pk),wy=e=>$r(e,Tk,Pe),xk=e=>$r(e,Gx,$x),wk=e=>$r(e,Qx,rh),by=e=>$r(e,Wx,rh),bk=e=>$r(e,Hx,gk),jl=e=>$r(e,Yx,mk),le=e=>zx.test(e),ko=e=>Ns(e,Kx),Sk=e=>Ns(e,Qx),Sy=e=>Ns(e,Wx),Ek=e=>Ns(e,qx),Ck=e=>Ns(e,Hx),Ol=e=>Ns(e,Yx,!0),kk=e=>Ns(e,Gx,!0),$r=(e,t,n)=>{const s=Ux.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ns=(e,t,n=!1)=>{const s=zx.exec(e);return s?s[1]?t(s[1]):n:!1},Wx=e=>e==="position"||e==="percentage",Hx=e=>e==="image"||e==="url",qx=e=>e==="length"||e==="size"||e==="bg-size",Kx=e=>e==="length",Tk=e=>e==="number",Qx=e=>e==="family-name",Gx=e=>e==="number"||e==="weight",Yx=e=>e==="shadow",_k=()=>{const e=ot("color"),t=ot("font"),n=ot("text"),s=ot("font-weight"),o=ot("tracking"),l=ot("leading"),c=ot("breakpoint"),d=ot("container"),f=ot("spacing"),p=ot("radius"),y=ot("shadow"),v=ot("inset-shadow"),w=ot("text-shadow"),C=ot("drop-shadow"),A=ot("blur"),E=ot("perspective"),b=ot("aspect"),S=ot("ease"),P=ot("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...R(),le,ae],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],I=()=>[le,ae,f],G=()=>[Tr,"full","auto",...I()],ee=()=>[_r,"none","subgrid",le,ae],de=()=>["auto",{span:["full",_r,le,ae]},_r,le,ae],Te=()=>[_r,"auto",le,ae],xe=()=>["auto","min","max","fr",le,ae],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ae=()=>["start","end","center","stretch","center-safe","end-safe"],Ce=()=>["auto",...I()],ie=()=>[Tr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],W=()=>[Tr,"screen","full","dvw","lvw","svw","min","max","fit",...I()],ne=()=>[Tr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],z=()=>[e,le,ae],O=()=>[...R(),Sy,by,{position:[le,ae]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",Ek,vk,{size:[le,ae]}],pe=()=>[kd,ko,ss],he=()=>["","none","full",p,le,ae],X=()=>["",Pe,ko,ss],be=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[Pe,kd,Sy,by],at=()=>["","none",A,le,ae],Gt=()=>["none",Pe,le,ae],ht=()=>["none",Pe,le,ae],dn=()=>[Pe,le,ae],Yt=()=>[Tr,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xn],breakpoint:[Xn],color:[$x],container:[Xn],"drop-shadow":[Xn],ease:["in","out","in-out"],font:[yk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xn],shadow:[Xn],spacing:["px",Pe],text:[Xn],"text-shadow":[Xn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Tr,ae,le,b]}],container:["container"],columns:[{columns:[Pe,ae,le,d]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{"inset-s":G(),start:G()}],end:[{"inset-e":G(),end:G()}],"inset-bs":[{"inset-bs":G()}],"inset-be":[{"inset-be":G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[_r,"auto",le,ae]}],basis:[{basis:[Tr,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Tr,"auto","initial","none",ae]}],grow:[{grow:["",Pe,le,ae]}],shrink:[{shrink:["",Pe,le,ae]}],order:[{order:[_r,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...Ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ae()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...Ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...Ae(),"baseline"]}],"place-self":[{"place-self":["auto",...Ae()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:Ce()}],mx:[{mx:Ce()}],my:[{my:Ce()}],ms:[{ms:Ce()}],me:[{me:Ce()}],mbs:[{mbs:Ce()}],mbe:[{mbe:Ce()}],mt:[{mt:Ce()}],mr:[{mr:Ce()}],mb:[{mb:Ce()}],ml:[{ml:Ce()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[d,"screen",...ie()]}],"min-w":[{"min-w":[d,"screen","none",...ie()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...ie()]}],h:[{h:["screen","lh",...ie()]}],"min-h":[{"min-h":["screen","lh","none",...ie()]}],"max-h":[{"max-h":["screen","lh",...ie()]}],"font-size":[{text:["base",n,ko,ss]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,kk,xk]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kd,ae]}],"font-family":[{font:[Sk,wk,t]}],"font-features":[{"font-features":[ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,ae]}],"line-clamp":[{"line-clamp":[Pe,"none",le,wy]}],leading:[{leading:[l,...I()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",le,ss]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Pe,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_r,le,ae],radial:["",le,ae],conic:[_r,le,ae]},Ck,bk]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,le,ae]}],"outline-w":[{outline:["",Pe,ko,ss]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",y,Ol,jl]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",v,Ol,jl]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Pe,ss]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",w,Ol,jl]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Pe,le,ae]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:at()}],brightness:[{brightness:[Pe,le,ae]}],contrast:[{contrast:[Pe,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",C,Ol,jl]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Pe,le,ae]}],"hue-rotate":[{"hue-rotate":[Pe,le,ae]}],invert:[{invert:["",Pe,le,ae]}],saturate:[{saturate:[Pe,le,ae]}],sepia:[{sepia:["",Pe,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",Pe,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",le,ae]}],ease:[{ease:["linear","initial",S,le,ae]}],delay:[{delay:[Pe,le,ae]}],animate:[{animate:["none",P,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,le,ae]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Gt()}],"rotate-x":[{"rotate-x":Gt()}],"rotate-y":[{"rotate-y":Gt()}],"rotate-z":[{"rotate-z":Gt()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:dn()}],"skew-x":[{"skew-x":dn()}],"skew-y":[{"skew-y":dn()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Yt()}],"translate-x":[{"translate-x":Yt()}],"translate-y":[{"translate-y":Yt()}],"translate-z":[{"translate-z":Yt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ae]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Pe,ko,ss,wy]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ak=ok(_k);function Ni(...e){return Ak(Dx(e))}const Pk=m2,Xx=k.forwardRef(({className:e,...t},n)=>m.jsx(_x,{ref:n,className:Ni("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Xx.displayName=_x.displayName;const Rk=g2("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Jx=k.forwardRef(({className:e,variant:t,...n},s)=>m.jsx(Ax,{ref:s,className:Ni(Rk({variant:t}),e),...n}));Jx.displayName=Ax.displayName;const Nk=k.forwardRef(({className:e,...t},n)=>m.jsx(Nx,{ref:n,className:Ni("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Nk.displayName=Nx.displayName;const Zx=k.forwardRef(({className:e,...t},n)=>m.jsx(jx,{ref:n,className:Ni("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:m.jsx(B2,{className:"h-4 w-4"})}));Zx.displayName=jx.displayName;const ew=k.forwardRef(({className:e,...t},n)=>m.jsx(Px,{ref:n,className:Ni("text-sm font-semibold",e),...t}));ew.displayName=Px.displayName;const tw=k.forwardRef(({className:e,...t},n)=>m.jsx(Rx,{ref:n,className:Ni("text-sm opacity-90",e),...t}));tw.displayName=Rx.displayName;function jk(){const{toasts:e}=yC();return m.jsxs(Pk,{children:[e.map(function({id:t,title:n,description:s,action:o,...l}){return m.jsxs(Jx,{...l,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx(ew,{children:n}),s&&m.jsx(tw,{children:s})]}),o,m.jsx(Zx,{})]},t)}),m.jsx(Xx,{})]})}var la=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ok={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Rr,qf,K0,Dk=(K0=class{constructor(){ve(this,Rr,Ok);ve(this,qf,!1)}setTimeoutProvider(e){re(this,Rr,e)}setTimeout(e,t){return j(this,Rr).setTimeout(e,t)}clearTimeout(e){j(this,Rr).clearTimeout(e)}setInterval(e,t){return j(this,Rr).setInterval(e,t)}clearInterval(e){j(this,Rr).clearInterval(e)}},Rr=new WeakMap,qf=new WeakMap,K0),us=new Dk;function Lk(e){setTimeout(e,0)}var _s=typeof window>"u"||"Deno"in globalThis;function Bt(){}function Mk(e,t){return typeof e=="function"?e(t):e}function nf(e){return typeof e=="number"&&e>=0&&e!==1/0}function nw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Br(e,t){return typeof e=="function"?e(t):e}function cn(e,t){return typeof e=="function"?e(t):e}function Ey(e,t){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:c,stale:d}=e;if(c){if(s){if(t.queryHash!==sh(c,t.options))return!1}else if(!Qo(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function Cy(e,t){const{exact:n,status:s,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Ko(t.options.mutationKey)!==Ko(l))return!1}else if(!Qo(t.options.mutationKey,l))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function sh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ko)(e)}function Ko(e){return JSON.stringify(e,(t,n)=>sf(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function Qo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qo(e[n],t[n])):!1}var Fk=Object.prototype.hasOwnProperty;function rw(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=ky(e)&&ky(t);if(!s&&!(sf(e)&&sf(t)))return t;const l=(s?e:Object.keys(e)).length,c=s?t:Object.keys(t),d=c.length,f=s?new Array(d):{};let p=0;for(let y=0;y{us.setTimeout(t,e)})}function of(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?rw(e,t):t}function Bk(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Vk(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var ih=Symbol();function sw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ih?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function iw(e,t){return typeof e=="function"?e(...t):!!e}function Uk(e,t,n){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var hs,Nr,hi,Q0,zk=(Q0=class extends la{constructor(){super();ve(this,hs);ve(this,Nr);ve(this,hi);re(this,hi,t=>{if(!_s&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,Nr)||this.setEventListener(j(this,hi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Nr))==null||t.call(this),re(this,Nr,void 0))}setEventListener(t){var n;re(this,hi,t),(n=j(this,Nr))==null||n.call(this),re(this,Nr,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){j(this,hs)!==t&&(re(this,hs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,hs)=="boolean"?j(this,hs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hs=new WeakMap,Nr=new WeakMap,hi=new WeakMap,Q0),oh=new zk;function af(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},n.reject=o=>{s({status:"rejected",reason:o}),t(o)},n}var $k=Lk;function Wk(){let e=[],t=0,n=d=>{d()},s=d=>{d()},o=$k;const l=d=>{t?e.push(d):o(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var xt=Wk(),pi,jr,mi,G0,Hk=(G0=class extends la{constructor(){super();ve(this,pi,!0);ve(this,jr);ve(this,mi);re(this,mi,t=>{if(!_s&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){j(this,jr)||this.setEventListener(j(this,mi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,jr))==null||t.call(this),re(this,jr,void 0))}setEventListener(t){var n;re(this,mi,t),(n=j(this,jr))==null||n.call(this),re(this,jr,t(this.setOnline.bind(this)))}setOnline(t){j(this,pi)!==t&&(re(this,pi,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return j(this,pi)}},pi=new WeakMap,jr=new WeakMap,mi=new WeakMap,G0),tc=new Hk;function qk(e){return Math.min(1e3*2**e,3e4)}function ow(e){return(e??"online")==="online"?tc.isOnline():!0}var lf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function aw(e){let t=!1,n=0,s;const o=af(),l=()=>o.status!=="pending",c=E=>{var b;if(!l()){const S=new lf(E);w(S),(b=e.onCancel)==null||b.call(e,S)}},d=()=>{t=!0},f=()=>{t=!1},p=()=>oh.isFocused()&&(e.networkMode==="always"||tc.isOnline())&&e.canRun(),y=()=>ow(e.networkMode)&&e.canRun(),v=E=>{l()||(s==null||s(),o.resolve(E))},w=E=>{l()||(s==null||s(),o.reject(E))},C=()=>new Promise(E=>{var b;s=S=>{(l()||p())&&E(S)},(b=e.onPause)==null||b.call(e)}).then(()=>{var E;s=void 0,l()||(E=e.onContinue)==null||E.call(e)}),A=()=>{if(l())return;let E;const b=n===0?e.initialPromise:void 0;try{E=b??e.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(v).catch(S=>{var U;if(l())return;const P=e.retry??(_s?0:3),T=e.retryDelay??qk,R=typeof T=="function"?T(n,S):T,F=P===!0||typeof P=="number"&&np()?void 0:C()).then(()=>{t?w(S):A()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(s==null||s(),o),cancelRetry:d,continueRetry:f,canStart:y,start:()=>(y()?A():C().then(A),o)}}var ps,Y0,lw=(Y0=class{constructor(){ve(this,ps)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nf(this.gcTime)&&re(this,ps,us.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_s?1/0:300*1e3))}clearGcTimeout(){j(this,ps)&&(us.clearTimeout(j(this,ps)),re(this,ps,void 0))}},ps=new WeakMap,Y0),ms,gi,an,gs,dt,na,ys,Sn,Jn,X0,Kk=(X0=class extends lw{constructor(t){super();ve(this,Sn);ve(this,ms);ve(this,gi);ve(this,an);ve(this,gs);ve(this,dt);ve(this,na);ve(this,ys);re(this,ys,!1),re(this,na,t.defaultOptions),this.setOptions(t.options),this.observers=[],re(this,gs,t.client),re(this,an,j(this,gs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,re(this,ms,Ay(this.options)),this.state=t.state??j(this,ms),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,dt))==null?void 0:t.promise}setOptions(t){if(this.options={...j(this,na),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ay(this.options);n.data!==void 0&&(this.setState(_y(n.data,n.dataUpdatedAt)),re(this,ms,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,an).remove(this)}setData(t,n){const s=of(this.state.data,t,this.options);return Ne(this,Sn,Jn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){Ne(this,Sn,Jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,o;const n=(s=j(this,dt))==null?void 0:s.promise;return(o=j(this,dt))==null||o.cancel(t),n?n.then(Bt).catch(Bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,ms))}isActive(){return this.observers.some(t=>cn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ih||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Br(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!nw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,an).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,dt)&&(j(this,ys)?j(this,dt).cancel({revert:!0}):j(this,dt).cancelRetry()),this.scheduleGc()),j(this,an).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,Sn,Jn).call(this,{type:"invalidate"})}async fetch(t,n){var f,p,y,v,w,C,A,E,b,S,P,T;if(this.state.fetchStatus!=="idle"&&((f=j(this,dt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,dt))return j(this,dt).continueRetry(),j(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(F=>F.options.queryFn);R&&this.setOptions(R.options)}const s=new AbortController,o=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(re(this,ys,!0),s.signal)})},l=()=>{const R=sw(this.options,n),U=(()=>{const H={client:j(this,gs),queryKey:this.queryKey,meta:this.meta};return o(H),H})();return re(this,ys,!1),this.options.persister?this.options.persister(R,U,this):R(U)},d=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,gs),state:this.state,fetchFn:l};return o(R),R})();(p=this.options.behavior)==null||p.onFetch(d,this),re(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=d.fetchOptions)==null?void 0:y.meta))&&Ne(this,Sn,Jn).call(this,{type:"fetch",meta:(v=d.fetchOptions)==null?void 0:v.meta}),re(this,dt,aw({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:R=>{R instanceof lf&&R.revert&&this.setState({...j(this,gi),fetchStatus:"idle"}),s.abort()},onFail:(R,F)=>{Ne(this,Sn,Jn).call(this,{type:"failed",failureCount:R,error:F})},onPause:()=>{Ne(this,Sn,Jn).call(this,{type:"pause"})},onContinue:()=>{Ne(this,Sn,Jn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const R=await j(this,dt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(C=(w=j(this,an).config).onSuccess)==null||C.call(w,R,this),(E=(A=j(this,an).config).onSettled)==null||E.call(A,R,this.state.error,this),R}catch(R){if(R instanceof lf){if(R.silent)return j(this,dt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ne(this,Sn,Jn).call(this,{type:"error",error:R}),(S=(b=j(this,an).config).onError)==null||S.call(b,R,this),(T=(P=j(this,an).config).onSettled)==null||T.call(P,this.state.data,R,this),R}finally{this.scheduleGc()}}},ms=new WeakMap,gi=new WeakMap,an=new WeakMap,gs=new WeakMap,dt=new WeakMap,na=new WeakMap,ys=new WeakMap,Sn=new WeakSet,Jn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...cw(s.data,this.options),fetchMeta:t.meta??null};case"success":const o={...s,..._y(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,gi,t.manual?o:void 0),o;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),xt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),j(this,an).notify({query:this,type:"updated",action:t})})},X0);function cw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ow(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _y(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ay(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var It,je,ra,Nt,vs,yi,Zn,Or,sa,vi,xi,xs,ws,Dr,wi,Fe,Ro,cf,uf,df,ff,hf,pf,mf,uw,J0,Qk=(J0=class extends la{constructor(t,n){super();ve(this,Fe);ve(this,It);ve(this,je);ve(this,ra);ve(this,Nt);ve(this,vs);ve(this,yi);ve(this,Zn);ve(this,Or);ve(this,sa);ve(this,vi);ve(this,xi);ve(this,xs);ve(this,ws);ve(this,Dr);ve(this,wi,new Set);this.options=n,re(this,It,t),re(this,Or,null),re(this,Zn,af()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,je).addObserver(this),Py(j(this,je),this.options)?Ne(this,Fe,Ro).call(this):this.updateResult(),Ne(this,Fe,ff).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gf(j(this,je),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gf(j(this,je),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,Fe,hf).call(this),Ne(this,Fe,pf).call(this),j(this,je).removeObserver(this)}setOptions(t){const n=this.options,s=j(this,je);if(this.options=j(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cn(this.options.enabled,j(this,je))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,Fe,mf).call(this),j(this,je).setOptions(this.options),n._defaulted&&!rf(this.options,n)&&j(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,je),observer:this});const o=this.hasListeners();o&&Ry(j(this,je),s,this.options,n)&&Ne(this,Fe,Ro).call(this),this.updateResult(),o&&(j(this,je)!==s||cn(this.options.enabled,j(this,je))!==cn(n.enabled,j(this,je))||Br(this.options.staleTime,j(this,je))!==Br(n.staleTime,j(this,je)))&&Ne(this,Fe,cf).call(this);const l=Ne(this,Fe,uf).call(this);o&&(j(this,je)!==s||cn(this.options.enabled,j(this,je))!==cn(n.enabled,j(this,je))||l!==j(this,Dr))&&Ne(this,Fe,df).call(this,l)}getOptimisticResult(t){const n=j(this,It).getQueryCache().build(j(this,It),t),s=this.createResult(n,t);return Yk(this,s)&&(re(this,Nt,s),re(this,yi,this.options),re(this,vs,j(this,je).state)),s}getCurrentResult(){return j(this,Nt)}trackResult(t,n){return new Proxy(t,{get:(s,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&j(this,Zn).status==="pending"&&j(this,Zn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(t){j(this,wi).add(t)}getCurrentQuery(){return j(this,je)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,It).defaultQueryOptions(t),s=j(this,It).getQueryCache().build(j(this,It),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return Ne(this,Fe,Ro).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Nt)))}createResult(t,n){var G;const s=j(this,je),o=this.options,l=j(this,Nt),c=j(this,vs),d=j(this,yi),p=t!==s?t.state:j(this,ra),{state:y}=t;let v={...y},w=!1,C;if(n._optimisticResults){const ee=this.hasListeners(),de=!ee&&Py(t,n),Te=ee&&Ry(t,s,n,o);(de||Te)&&(v={...v,...cw(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:A,errorUpdatedAt:E,status:b}=v;C=v.data;let S=!1;if(n.placeholderData!==void 0&&C===void 0&&b==="pending"){let ee;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(ee=l.data,S=!0):ee=typeof n.placeholderData=="function"?n.placeholderData((G=j(this,xi))==null?void 0:G.state.data,j(this,xi)):n.placeholderData,ee!==void 0&&(b="success",C=of(l==null?void 0:l.data,ee,n),w=!0)}if(n.select&&C!==void 0&&!S)if(l&&C===(c==null?void 0:c.data)&&n.select===j(this,sa))C=j(this,vi);else try{re(this,sa,n.select),C=n.select(C),C=of(l==null?void 0:l.data,C,n),re(this,vi,C),re(this,Or,null)}catch(ee){re(this,Or,ee)}j(this,Or)&&(A=j(this,Or),C=j(this,vi),E=Date.now(),b="error");const P=v.fetchStatus==="fetching",T=b==="pending",R=b==="error",F=T&&P,U=C!==void 0,I={status:b,fetchStatus:v.fetchStatus,isPending:T,isSuccess:b==="success",isError:R,isInitialLoading:F,isLoading:F,data:C,dataUpdatedAt:v.dataUpdatedAt,error:A,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:P,isRefetching:P&&!T,isLoadingError:R&&!U,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:R&&U,isStale:ah(t,n),refetch:this.refetch,promise:j(this,Zn),isEnabled:cn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ee=I.data!==void 0,de=I.status==="error"&&!ee,Te=Ae=>{de?Ae.reject(I.error):ee&&Ae.resolve(I.data)},xe=()=>{const Ae=re(this,Zn,I.promise=af());Te(Ae)},Z=j(this,Zn);switch(Z.status){case"pending":t.queryHash===s.queryHash&&Te(Z);break;case"fulfilled":(de||I.data!==Z.value)&&xe();break;case"rejected":(!de||I.error!==Z.reason)&&xe();break}}return I}updateResult(){const t=j(this,Nt),n=this.createResult(j(this,je),this.options);if(re(this,vs,j(this,je).state),re(this,yi,this.options),j(this,vs).data!==void 0&&re(this,xi,j(this,je)),rf(n,t))return;re(this,Nt,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!j(this,wi).size)return!0;const c=new Set(l??j(this,wi));return this.options.throwOnError&&c.add("error"),Object.keys(j(this,Nt)).some(d=>{const f=d;return j(this,Nt)[f]!==t[f]&&c.has(f)})};Ne(this,Fe,uw).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,Fe,ff).call(this)}},It=new WeakMap,je=new WeakMap,ra=new WeakMap,Nt=new WeakMap,vs=new WeakMap,yi=new WeakMap,Zn=new WeakMap,Or=new WeakMap,sa=new WeakMap,vi=new WeakMap,xi=new WeakMap,xs=new WeakMap,ws=new WeakMap,Dr=new WeakMap,wi=new WeakMap,Fe=new WeakSet,Ro=function(t){Ne(this,Fe,mf).call(this);let n=j(this,je).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Bt)),n},cf=function(){Ne(this,Fe,hf).call(this);const t=Br(this.options.staleTime,j(this,je));if(_s||j(this,Nt).isStale||!nf(t))return;const s=nw(j(this,Nt).dataUpdatedAt,t)+1;re(this,xs,us.setTimeout(()=>{j(this,Nt).isStale||this.updateResult()},s))},uf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,je)):this.options.refetchInterval)??!1},df=function(t){Ne(this,Fe,pf).call(this),re(this,Dr,t),!(_s||cn(this.options.enabled,j(this,je))===!1||!nf(j(this,Dr))||j(this,Dr)===0)&&re(this,ws,us.setInterval(()=>{(this.options.refetchIntervalInBackground||oh.isFocused())&&Ne(this,Fe,Ro).call(this)},j(this,Dr)))},ff=function(){Ne(this,Fe,cf).call(this),Ne(this,Fe,df).call(this,Ne(this,Fe,uf).call(this))},hf=function(){j(this,xs)&&(us.clearTimeout(j(this,xs)),re(this,xs,void 0))},pf=function(){j(this,ws)&&(us.clearInterval(j(this,ws)),re(this,ws,void 0))},mf=function(){const t=j(this,It).getQueryCache().build(j(this,It),this.options);if(t===j(this,je))return;const n=j(this,je);re(this,je,t),re(this,ra,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},uw=function(t){xt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,Nt))}),j(this,It).getQueryCache().notify({query:j(this,je),type:"observerResultsUpdated"})})},J0);function Gk(e,t){return cn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Py(e,t){return Gk(e,t)||e.state.data!==void 0&&gf(e,t,t.refetchOnMount)}function gf(e,t,n){if(cn(t.enabled,e)!==!1&&Br(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&ah(e,t)}return!1}function Ry(e,t,n,s){return(e!==t||cn(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ah(e,n)}function ah(e,t){return cn(t.enabled,e)!==!1&&e.isStaleByTime(Br(t.staleTime,e))}function Yk(e,t){return!rf(e.getCurrentResult(),t)}function Ny(e){return{onFetch:(t,n)=>{var y,v,w,C,A;const s=t.options,o=(w=(v=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:w.direction,l=((C=t.state.data)==null?void 0:C.pages)||[],c=((A=t.state.data)==null?void 0:A.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let E=!1;const b=T=>{Uk(T,()=>t.signal,()=>E=!0)},S=sw(t.options,t.fetchOptions),P=async(T,R,F)=>{if(E)return Promise.reject();if(R==null&&T.pages.length)return Promise.resolve(T);const H=(()=>{const de={client:t.client,queryKey:t.queryKey,pageParam:R,direction:F?"backward":"forward",meta:t.options.meta};return b(de),de})(),I=await S(H),{maxPages:G}=t.options,ee=F?Vk:Bk;return{pages:ee(T.pages,I,G),pageParams:ee(T.pageParams,R,G)}};if(o&&l.length){const T=o==="backward",R=T?Xk:jy,F={pages:l,pageParams:c},U=R(s,F);d=await P(F,U,T)}else{const T=e??l.length;do{const R=f===0?c[0]??s.initialPageParam:jy(s,d);if(f>0&&R==null)break;d=await P(d,R),f++}while(f{var E,b;return(b=(E=t.options).persister)==null?void 0:b.call(E,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function jy(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function Xk(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var ia,jn,Tt,bs,On,Ar,Z0,Jk=(Z0=class extends lw{constructor(t){super();ve(this,On);ve(this,ia);ve(this,jn);ve(this,Tt);ve(this,bs);re(this,ia,t.client),this.mutationId=t.mutationId,re(this,Tt,t.mutationCache),re(this,jn,[]),this.state=t.state||Zk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,jn).includes(t)||(j(this,jn).push(t),this.clearGcTimeout(),j(this,Tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){re(this,jn,j(this,jn).filter(n=>n!==t)),this.scheduleGc(),j(this,Tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,jn).length||(this.state.status==="pending"?this.scheduleGc():j(this,Tt).remove(this))}continue(){var t;return((t=j(this,bs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,d,f,p,y,v,w,C,A,E,b,S,P,T,R,F,U,H;const n=()=>{Ne(this,On,Ar).call(this,{type:"continue"})},s={client:j(this,ia),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,bs,aw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(I,G)=>{Ne(this,On,Ar).call(this,{type:"failed",failureCount:I,error:G})},onPause:()=>{Ne(this,On,Ar).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Tt).canRun(this)}));const o=this.state.status==="pending",l=!j(this,bs).canStart();try{if(o)n();else{Ne(this,On,Ar).call(this,{type:"pending",variables:t,isPaused:l}),j(this,Tt).config.onMutate&&await j(this,Tt).config.onMutate(t,this,s);const G=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,s));G!==this.state.context&&Ne(this,On,Ar).call(this,{type:"pending",context:G,variables:t,isPaused:l})}const I=await j(this,bs).start();return await((p=(f=j(this,Tt).config).onSuccess)==null?void 0:p.call(f,I,t,this.state.context,this,s)),await((v=(y=this.options).onSuccess)==null?void 0:v.call(y,I,t,this.state.context,s)),await((C=(w=j(this,Tt).config).onSettled)==null?void 0:C.call(w,I,null,this.state.variables,this.state.context,this,s)),await((E=(A=this.options).onSettled)==null?void 0:E.call(A,I,null,t,this.state.context,s)),Ne(this,On,Ar).call(this,{type:"success",data:I}),I}catch(I){try{await((S=(b=j(this,Tt).config).onError)==null?void 0:S.call(b,I,t,this.state.context,this,s))}catch(G){Promise.reject(G)}try{await((T=(P=this.options).onError)==null?void 0:T.call(P,I,t,this.state.context,s))}catch(G){Promise.reject(G)}try{await((F=(R=j(this,Tt).config).onSettled)==null?void 0:F.call(R,void 0,I,this.state.variables,this.state.context,this,s))}catch(G){Promise.reject(G)}try{await((H=(U=this.options).onSettled)==null?void 0:H.call(U,void 0,I,t,this.state.context,s))}catch(G){Promise.reject(G)}throw Ne(this,On,Ar).call(this,{type:"error",error:I}),I}finally{j(this,Tt).runNext(this)}}},ia=new WeakMap,jn=new WeakMap,Tt=new WeakMap,bs=new WeakMap,On=new WeakSet,Ar=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),xt.batch(()=>{j(this,jn).forEach(s=>{s.onMutationUpdate(t)}),j(this,Tt).notify({mutation:this,type:"updated",action:t})})},Z0);function Zk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var er,En,oa,ex,eT=(ex=class extends la{constructor(t={}){super();ve(this,er);ve(this,En);ve(this,oa);this.config=t,re(this,er,new Set),re(this,En,new Map),re(this,oa,0)}build(t,n,s){const o=new Jk({client:t,mutationCache:this,mutationId:++Al(this,oa)._,options:t.defaultMutationOptions(n),state:s});return this.add(o),o}add(t){j(this,er).add(t);const n=Dl(t);if(typeof n=="string"){const s=j(this,En).get(n);s?s.push(t):j(this,En).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,er).delete(t)){const n=Dl(t);if(typeof n=="string"){const s=j(this,En).get(n);if(s)if(s.length>1){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}else s[0]===t&&j(this,En).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Dl(t);if(typeof n=="string"){const s=j(this,En).get(n),o=s==null?void 0:s.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var s;const n=Dl(t);if(typeof n=="string"){const o=(s=j(this,En).get(n))==null?void 0:s.find(l=>l!==t&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){xt.batch(()=>{j(this,er).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,er).clear(),j(this,En).clear()})}getAll(){return Array.from(j(this,er))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Cy(n,s))}findAll(t={}){return this.getAll().filter(n=>Cy(t,n))}notify(t){xt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return xt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Bt))))}},er=new WeakMap,En=new WeakMap,oa=new WeakMap,ex);function Dl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Dn,tx,tT=(tx=class extends la{constructor(t={}){super();ve(this,Dn);this.config=t,re(this,Dn,new Map)}build(t,n,s){const o=n.queryKey,l=n.queryHash??sh(o,n);let c=this.get(l);return c||(c=new Kk({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(o)}),this.add(c)),c}add(t){j(this,Dn).has(t.queryHash)||(j(this,Dn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=j(this,Dn).get(t.queryHash);n&&(t.destroy(),n===t&&j(this,Dn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){xt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,Dn).get(t)}getAll(){return[...j(this,Dn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Ey(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>Ey(t,s)):n}notify(t){xt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){xt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){xt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dn=new WeakMap,tx),Ge,Lr,Mr,bi,Si,Fr,Ei,Ci,nx,nT=(nx=class{constructor(e={}){ve(this,Ge);ve(this,Lr);ve(this,Mr);ve(this,bi);ve(this,Si);ve(this,Fr);ve(this,Ei);ve(this,Ci);re(this,Ge,e.queryCache||new tT),re(this,Lr,e.mutationCache||new eT),re(this,Mr,e.defaultOptions||{}),re(this,bi,new Map),re(this,Si,new Map),re(this,Fr,0)}mount(){Al(this,Fr)._++,j(this,Fr)===1&&(re(this,Ei,oh.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Ge).onFocus())})),re(this,Ci,tc.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Ge).onOnline())})))}unmount(){var e,t;Al(this,Fr)._--,j(this,Fr)===0&&((e=j(this,Ei))==null||e.call(this),re(this,Ei,void 0),(t=j(this,Ci))==null||t.call(this),re(this,Ci,void 0))}isFetching(e){return j(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Lr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,Ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=j(this,Ge).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Br(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return j(this,Ge).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),o=j(this,Ge).get(s.queryHash),l=o==null?void 0:o.state.data,c=Mk(t,l);if(c!==void 0)return j(this,Ge).build(this,s).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return xt.batch(()=>j(this,Ge).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,Ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=j(this,Ge);xt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=j(this,Ge);return xt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=xt.batch(()=>j(this,Ge).findAll(e).map(o=>o.cancel(n)));return Promise.all(s).then(Bt).catch(Bt)}invalidateQueries(e,t={}){return xt.batch(()=>(j(this,Ge).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=xt.batch(()=>j(this,Ge).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Bt)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=j(this,Ge).build(this,t);return n.isStaleByTime(Br(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Bt).catch(Bt)}fetchInfiniteQuery(e){return e.behavior=Ny(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Bt).catch(Bt)}ensureInfiniteQueryData(e){return e.behavior=Ny(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return tc.isOnline()?j(this,Lr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Ge)}getMutationCache(){return j(this,Lr)}getDefaultOptions(){return j(this,Mr)}setDefaultOptions(e){re(this,Mr,e)}setQueryDefaults(e,t){j(this,bi).set(Ko(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,bi).values()],n={};return t.forEach(s=>{Qo(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){j(this,Si).set(Ko(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,Si).values()],n={};return t.forEach(s=>{Qo(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,Mr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ih&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Mr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,Ge).clear(),j(this,Lr).clear()}},Ge=new WeakMap,Lr=new WeakMap,Mr=new WeakMap,bi=new WeakMap,Si=new WeakMap,Fr=new WeakMap,Ei=new WeakMap,Ci=new WeakMap,nx),dw=k.createContext(void 0),rT=e=>{const t=k.useContext(dw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sT=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(dw.Provider,{value:e,children:t})),fw=k.createContext(!1),iT=()=>k.useContext(fw);fw.Provider;function oT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var aT=k.createContext(oT()),lT=()=>k.useContext(aT),cT=(e,t,n)=>{const s=n!=null&&n.state.error&&typeof e.throwOnError=="function"?iw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},uT=e=>{k.useEffect(()=>{e.clearReset()},[e])},dT=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||iw(n,[e.error,s])),fT=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},hT=(e,t)=>e.isLoading&&e.isFetching&&!t,pT=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Oy=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function mT(e,t,n){var w,C,A,E;const s=iT(),o=lT(),l=rT(),c=l.defaultQueryOptions(e);(C=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||C.call(w,c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=s?"isRestoring":"optimistic",fT(c),cT(c,o,d),uT(o);const f=!l.getQueryCache().get(c.queryHash),[p]=k.useState(()=>new t(l,c)),y=p.getOptimisticResult(c),v=!s&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(b=>{const S=v?p.subscribe(xt.batchCalls(b)):Bt;return p.updateResult(),S},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),k.useEffect(()=>{p.setOptions(c)},[c,p]),pT(c,y))throw Oy(c,p,o);if(dT({result:y,errorResetBoundary:o,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;if((E=(A=l.getDefaultOptions().queries)==null?void 0:A._experimental_afterQuery)==null||E.call(A,c,y),c.experimental_prefetchInRender&&!_s&&hT(y,s)){const b=f?Oy(c,p,o):d==null?void 0:d.promise;b==null||b.catch(Bt).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?y:p.trackResult(y)}function gT(e,t){return mT(e,Qk)}const yT=new nT({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function lh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xT(){return Math.random().toString(36).substr(2,8)}function Ly(e,t){return{usr:e.state,key:e.key,idx:t}}function yf(e,t,n,s){return n===void 0&&(n=null),Go({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ji(t):t,{state:n,key:t&&t.key||s||xT()})}function nc(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function wT(e,t,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,c=o.history,d=Ir.Pop,f=null,p=y();p==null&&(p=0,c.replaceState(Go({},c.state,{idx:p}),""));function y(){return(c.state||{idx:null}).idx}function v(){d=Ir.Pop;let b=y(),S=b==null?null:b-p;p=b,f&&f({action:d,location:E.location,delta:S})}function w(b,S){d=Ir.Push;let P=yf(E.location,b,S);p=y()+1;let T=Ly(P,p),R=E.createHref(P);try{c.pushState(T,"",R)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;o.location.assign(R)}l&&f&&f({action:d,location:E.location,delta:1})}function C(b,S){d=Ir.Replace;let P=yf(E.location,b,S);p=y();let T=Ly(P,p),R=E.createHref(P);c.replaceState(T,"",R),l&&f&&f({action:d,location:E.location,delta:0})}function A(b){let S=o.location.origin!=="null"?o.location.origin:o.location.href,P=typeof b=="string"?b:nc(b);return P=P.replace(/ $/,"%20"),rt(S,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,S)}let E={get action(){return d},get location(){return e(o,c)},listen(b){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(Dy,v),f=b,()=>{o.removeEventListener(Dy,v),f=null}},createHref(b){return t(o,b)},createURL:A,encodeLocation(b){let S=A(b);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:w,replace:C,go(b){return c.go(b)}};return E}var My;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(My||(My={}));function bT(e,t,n){return n===void 0&&(n="/"),ST(e,t,n)}function ST(e,t,n,s){let o=typeof t=="string"?ji(t):t,l=ch(o.pathname||"/",n);if(l==null)return null;let c=hw(e);ET(c);let d=null,f=LT(l);for(let p=0;d==null&&p{let f={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};f.relativePath.startsWith("/")&&(rt(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let p=Vr([s,f.relativePath]),y=n.concat(f);l.children&&l.children.length>0&&(rt(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),hw(l.children,t,y,p)),!(l.path==null&&!l.index)&&t.push({path:p,score:RT(p,l.index),routesMeta:y})};return e.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,c);else for(let f of pw(l.path))o(l,c,f)}),t}function pw(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let c=pw(s.join("/")),d=[];return d.push(...c.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function ET(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:NT(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const CT=/^:[\w-]+$/,kT=3,TT=2,_T=1,AT=10,PT=-2,Fy=e=>e==="*";function RT(e,t){let n=e.split("/"),s=n.length;return n.some(Fy)&&(s+=PT),t&&(s+=TT),n.filter(o=>!Fy(o)).reduce((o,l)=>o+(CT.test(l)?kT:l===""?_T:AT),s)}function NT(e,t){return e.length===t.length&&e.slice(0,-1).every((s,o)=>s===t[o])?e[e.length-1]-t[t.length-1]:0}function jT(e,t,n){let{routesMeta:s}=e,o={},l="/",c=[];for(let d=0;d{let{paramName:w,isOptional:C}=y;if(w==="*"){let E=d[v]||"";c=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const A=d[v];return C&&!A?p[w]=void 0:p[w]=(A||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:c,pattern:e}}function DT(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),lh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),s]}function LT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lh(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ch(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const MT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,FT=e=>MT.test(e);function IT(e,t){t===void 0&&(t="/");let{pathname:n,search:s="",hash:o=""}=typeof e=="string"?ji(e):e,l;if(n)if(FT(n))l=n;else{if(n.includes("//")){let c=n;n=yw(n),lh(!1,"Pathnames cannot have embedded double slashes - normalizing "+(c+" -> "+n))}n.startsWith("/")?l=Iy(n.substring(1),"/"):l=Iy(n,t)}else l=t;return{pathname:l,search:UT(s),hash:zT(o)}}function Iy(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Td(e,t,n,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function BT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mw(e,t){let n=BT(e);return t?n.map((s,o)=>o===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function gw(e,t,n,s){s===void 0&&(s=!1);let o;typeof e=="string"?o=ji(e):(o=Go({},e),rt(!o.pathname||!o.pathname.includes("?"),Td("?","pathname","search",o)),rt(!o.pathname||!o.pathname.includes("#"),Td("#","pathname","hash",o)),rt(!o.search||!o.search.includes("#"),Td("#","search","hash",o)));let l=e===""||o.pathname==="",c=l?"/":o.pathname,d;if(c==null)d=n;else{let v=t.length-1;if(!s&&c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),v-=1;o.pathname=w.join("/")}d=v>=0?t[v]:"/"}let f=IT(o,d),p=c&&c!=="/"&&c.endsWith("/"),y=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||y)&&(f.pathname+="/"),f}const yw=e=>e.replace(/\/\/+/g,"/"),Vr=e=>yw(e.join("/")),VT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),UT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $T(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vw=["post","put","patch","delete"];new Set(vw);const WT=["get",...vw];new Set(WT);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{d.current=!0}),k.useCallback(function(p,y){if(y===void 0&&(y={}),!d.current)return;if(typeof p=="number"){s.go(p);return}let v=gw(p,JSON.parse(c),l,y.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:Vr([t,v.pathname])),(y.replace?s.replace:s.push)(v,y.state,y)},[t,s,c,l,e])}function bw(e,t){let{relative:n}=t===void 0?{}:t,{future:s}=k.useContext(js),{matches:o}=k.useContext(Os),{pathname:l}=Oi(),c=JSON.stringify(mw(o,s.v7_relativeSplatPath));return k.useMemo(()=>gw(e,JSON.parse(c),l,n==="path"),[e,c,l,n])}function YT(e,t){return XT(e,t)}function XT(e,t,n,s){ua()||rt(!1);let{navigator:o}=k.useContext(js),{matches:l}=k.useContext(Os),c=l[l.length-1],d=c?c.params:{};c&&c.pathname;let f=c?c.pathnameBase:"/";c&&c.route;let p=Oi(),y;if(t){var v;let b=typeof t=="string"?ji(t):t;f==="/"||(v=b.pathname)!=null&&v.startsWith(f)||rt(!1),y=b}else y=p;let w=y.pathname||"/",C=w;if(f!=="/"){let b=f.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(b.length).join("/")}let A=bT(e,{pathname:C}),E=n_(A&&A.map(b=>Object.assign({},b,{params:Object.assign({},d,b.params),pathname:Vr([f,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?f:Vr([f,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),l,n,s);return t&&E?k.createElement(ca.Provider,{value:{location:Yo({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:Ir.Pop}},E):E}function JT(){let e=o_(),t=$T(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:o},n):null,null)}const ZT=k.createElement(JT,null);class e_ extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?k.createElement(Os.Provider,{value:this.props.routeContext},k.createElement(xw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function t_(e){let{routeContext:t,match:n,children:s}=e,o=k.useContext(uh);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(Os.Provider,{value:t},s)}function n_(e,t,n,s){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let c=e,d=(o=n)==null?void 0:o.errors;if(d!=null){let y=c.findIndex(v=>v.route.id&&(d==null?void 0:d[v.route.id])!==void 0);y>=0||rt(!1),c=c.slice(0,Math.min(c.length,y+1))}let f=!1,p=-1;if(n&&s&&s.v7_partialHydration)for(let y=0;y=0?c=c.slice(0,p+1):c=[c[0]];break}}}return c.reduceRight((y,v,w)=>{let C,A=!1,E=null,b=null;n&&(C=d&&v.route.id?d[v.route.id]:void 0,E=v.route.errorElement||ZT,f&&(p<0&&w===0?(l_("route-fallback"),A=!0,b=null):p===w&&(A=!0,b=v.route.hydrateFallbackElement||null)));let S=t.concat(c.slice(0,w+1)),P=()=>{let T;return C?T=E:A?T=b:v.route.Component?T=k.createElement(v.route.Component,null):v.route.element?T=v.route.element:T=y,k.createElement(t_,{match:v,routeContext:{outlet:y,matches:S,isDataRoute:n!=null},children:T})};return n&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?k.createElement(e_,{location:n.location,revalidation:n.revalidation,component:E,error:C,children:P(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):P()},null)}var Sw=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Sw||{}),Ew=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Ew||{});function r_(e){let t=k.useContext(uh);return t||rt(!1),t}function s_(e){let t=k.useContext(HT);return t||rt(!1),t}function i_(e){let t=k.useContext(Os);return t||rt(!1),t}function Cw(e){let t=i_(),n=t.matches[t.matches.length-1];return n.route.id||rt(!1),n.route.id}function o_(){var e;let t=k.useContext(xw),n=s_(),s=Cw();return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}function a_(){let{router:e}=r_(Sw.UseNavigateStable),t=Cw(Ew.UseNavigateStable),n=k.useRef(!1);return ww(()=>{n.current=!0}),k.useCallback(function(o,l){l===void 0&&(l={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Yo({fromRouteId:t},l)))},[e,t])}const By={};function l_(e,t,n){By[e]||(By[e]=!0)}function c_(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vf(e){rt(!1)}function u_(e){let{basename:t="/",children:n=null,location:s,navigationType:o=Ir.Pop,navigator:l,static:c=!1,future:d}=e;ua()&&rt(!1);let f=t.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:f,navigator:l,static:c,future:Yo({v7_relativeSplatPath:!1},d)}),[f,d,l,c]);typeof s=="string"&&(s=ji(s));let{pathname:y="/",search:v="",hash:w="",state:C=null,key:A="default"}=s,E=k.useMemo(()=>{let b=ch(y,f);return b==null?null:{location:{pathname:b,search:v,hash:w,state:C,key:A},navigationType:o}},[f,y,v,w,C,A,o]);return E==null?null:k.createElement(js.Provider,{value:p},k.createElement(ca.Provider,{children:n,value:E}))}function d_(e){let{children:t,location:n}=e;return YT(xf(t),n)}new Promise(()=>{});function xf(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(s,o)=>{if(!k.isValidElement(s))return;let l=[...t,o];if(s.type===k.Fragment){n.push.apply(n,xf(s.props.children,l));return}s.type!==vf&&rt(!1),!s.props.index||!s.props.children||rt(!1);let c={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=xf(s.props.children,l)),n.push(c)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{p&&Vy?Vy(()=>f(v)):f(v)},[f,p]);return k.useLayoutEffect(()=>c.listen(y),[c,y]),k.useEffect(()=>c_(s),[s]),k.createElement(u_,{basename:t,children:n,location:d.location,navigationType:d.action,navigator:c,future:s})}const x_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",w_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bo=k.forwardRef(function(t,n){let{onClick:s,relative:o,reloadDocument:l,replace:c,state:d,target:f,to:p,preventScrollReset:y,viewTransition:v}=t,w=f_(t,m_),{basename:C}=k.useContext(js),A,E=!1;if(typeof p=="string"&&w_.test(p)&&(A=p,x_))try{let T=new URL(window.location.href),R=p.startsWith("//")?new URL(T.protocol+p):new URL(p),F=ch(R.pathname,C);R.origin===T.origin&&F!=null?p=F+R.search+R.hash:E=!0}catch{}let b=qT(p,{relative:o}),S=b_(p,{replace:c,state:d,target:f,preventScrollReset:y,relative:o,viewTransition:v});function P(T){s&&s(T),T.defaultPrevented||S(T)}return k.createElement("a",wf({},w,{href:A||b,onClick:E||l?s:P,ref:n,target:f}))});var Uy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Uy||(Uy={}));var zy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(zy||(zy={}));function b_(e,t){let{target:n,replace:s,state:o,preventScrollReset:l,relative:c,viewTransition:d}=t===void 0?{}:t,f=QT(),p=Oi(),y=bw(e,{relative:c});return k.useCallback(v=>{if(p_(v,n)){v.preventDefault();let w=s!==void 0?s:nc(p)===nc(y);f(e,{replace:w,state:o,preventScrollReset:l,relative:c,viewTransition:d})}},[p,f,y,s,o,n,e,l,c,d])}function kw(e,t){return function(){return e.apply(t,arguments)}}const{toString:S_}=Object.prototype,{getPrototypeOf:ki}=Object,{iterator:da,toStringTag:Tw}=Symbol,rc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Xo=(e,t)=>{let n=e;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),rc(n,t))return!0;n=ki(n)}return!1},E_=(e,t)=>e!=null&&Xo(e,t)?e[t]:void 0,dh=(e=>t=>{const n=S_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tn=e=>(e=e.toLowerCase(),t=>dh(t)===e),mc=e=>t=>typeof t===e,{isArray:As}=Array,Ti=mc("undefined");function Di(e){return e!==null&&!Ti(e)&&e.constructor!==null&&!Ti(e.constructor)&&Vt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _w=Tn("ArrayBuffer");function C_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_w(e.buffer),t}const k_=mc("string"),Vt=mc("function"),Aw=mc("number"),Li=e=>e!==null&&typeof e=="object",T_=e=>e===!0||e===!1,Wl=e=>{if(!Li(e))return!1;const t=ki(e);return(t===null||t===Object.prototype||ki(t)===null)&&!Xo(e,Tw)&&!Xo(e,da)},__=e=>{if(!Li(e)||Di(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},A_=Tn("Date"),P_=Tn("File"),R_=e=>!!(e&&typeof e.uri<"u"),N_=e=>e&&typeof e.getParts<"u",j_=Tn("Blob"),O_=Tn("FileList"),D_=e=>Li(e)&&Vt(e.pipe);function L_(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const $y=L_(),Wy=typeof $y.FormData<"u"?$y.FormData:void 0,M_=e=>{if(!e)return!1;if(Wy&&e instanceof Wy)return!0;const t=ki(e);if(!t||t===Object.prototype||!Vt(e.append))return!1;const n=dh(e);return n==="formdata"||n==="object"&&Vt(e.toString)&&e.toString()==="[object FormData]"},F_=Tn("URLSearchParams"),[I_,B_,V_,U_]=["ReadableStream","Request","Response","Headers"].map(Tn),z_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fa(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),As(e))for(s=0,o=e.length;s0;)if(o=n[s],t===o.toLowerCase())return o;return null}const ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rw=e=>!Ti(e)&&e!==ds;function bf(...e){const{caseless:t,skipUndefined:n}=Rw(this)&&this||{},s={},o=(l,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=t&&typeof c=="string"&&Pw(s,c)||c,f=rc(s,d)?s[d]:void 0;Wl(f)&&Wl(l)?s[d]=bf(f,l):Wl(l)?s[d]=bf({},l):As(l)?s[d]=l.slice():(!n||!Ti(l))&&(s[d]=l)};for(let l=0,c=e.length;l(fa(t,(o,l)=>{n&&Vt(o)?Object.defineProperty(e,l,{__proto__:null,value:kw(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),W_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),H_=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},q_=(e,t,n,s)=>{let o,l,c;const d={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),l=o.length;l-- >0;)c=o[l],(!s||s(c,e,t))&&!d[c]&&(t[c]=e[c],d[c]=!0);e=n!==!1&&ki(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},K_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},Q_=e=>{if(!e)return null;if(As(e))return e;let t=e.length;if(!Aw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},G_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ki(Uint8Array)),Y_=(e,t)=>{const s=(e&&e[da]).call(e);let o;for(;(o=s.next())&&!o.done;){const l=o.value;t.call(e,l[0],l[1])}},X_=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},J_=Tn("HTMLFormElement"),Z_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),{propertyIsEnumerable:eA}=Object.prototype,tA=Tn("RegExp"),Nw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};fa(n,(o,l)=>{let c;(c=t(o,l,e))!==!1&&(s[l]=c||o)}),Object.defineProperties(e,s)},nA=e=>{Nw(e,(t,n)=>{if(Vt(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(Vt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},rA=(e,t)=>{const n={},s=o=>{o.forEach(l=>{n[l]=!0})};return As(e)?s(e):s(String(e).split(t)),n},sA=()=>{},iA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function oA(e){return!!(e&&Vt(e.append)&&e[Tw]==="FormData"&&e[da])}const aA=e=>{const t=new WeakSet,n=s=>{if(Li(s)){if(t.has(s))return;if(Di(s))return s;if(!("toJSON"in s)){t.add(s);const o=As(s)?[]:{};return fa(s,(l,c)=>{const d=n(l);!Ti(d)&&(o[c]=d)}),t.delete(s),o}}return s};return n(e)},lA=Tn("AsyncFunction"),cA=e=>e&&(Li(e)||Vt(e))&&Vt(e.then)&&Vt(e.catch),jw=((e,t)=>e?setImmediate:t?((n,s)=>(ds.addEventListener("message",({source:o,data:l})=>{o===ds&&l===n&&s.length&&s.shift()()},!1),o=>{s.push(o),ds.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vt(ds.postMessage)),uA=typeof queueMicrotask<"u"?queueMicrotask.bind(ds):typeof process<"u"&&process.nextTick||jw,Ow=e=>e!=null&&Vt(e[da]),dA=e=>e!=null&&Xo(e,da)&&Ow(e),L={isArray:As,isArrayBuffer:_w,isBuffer:Di,isFormData:M_,isArrayBufferView:C_,isString:k_,isNumber:Aw,isBoolean:T_,isObject:Li,isPlainObject:Wl,isEmptyObject:__,isReadableStream:I_,isRequest:B_,isResponse:V_,isHeaders:U_,isUndefined:Ti,isDate:A_,isFile:P_,isReactNativeBlob:R_,isReactNative:N_,isBlob:j_,isRegExp:tA,isFunction:Vt,isStream:D_,isURLSearchParams:F_,isTypedArray:G_,isFileList:O_,forEach:fa,merge:bf,extend:$_,trim:z_,stripBOM:W_,inherits:H_,toFlatObject:q_,kindOf:dh,kindOfTest:Tn,endsWith:K_,toArray:Q_,forEachEntry:Y_,matchAll:X_,isHTMLForm:J_,hasOwnProperty:rc,hasOwnProp:rc,hasOwnInPrototypeChain:Xo,getSafeProp:E_,reduceDescriptors:Nw,freezeMethods:nA,toObjectSet:rA,toCamelCase:Z_,noop:sA,toFiniteNumber:iA,findKey:Pw,global:ds,isContextDefined:Rw,isSpecCompliantForm:oA,toJSONObject:aA,isAsyncFn:lA,isThenable:cA,setImmediate:jw,asap:uA,isIterable:Ow,isSafeIterable:dA},fA=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hA=e=>{const t={};let n,s,o;return e&&e.split(` `).forEach(function(c){o=c.indexOf(":"),n=c.substring(0,o).trim().toLowerCase(),s=c.substring(o+1).trim(),!(!n||t[n]&&fA[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t};function pA(e){let t=0,n=e.length;for(;tt;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const mA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function fh(e,t){return L.isArray(e)?e.map(n=>fh(n,t)):pA(String(e).replace(t,""))}const yA=e=>fh(e,mA),vA=e=>fh(e,gA);function Dw(e){const t=Object.create(null);return L.forEach(e.toJSON(),(n,s)=>{t[s]=vA(n)}),t}const Hy=Symbol("internals");function To(e){return e&&String(e).trim().toLowerCase()}function Hl(e){return e===!1||e==null?e:L.isArray(e)?e.map(Hl):yA(String(e))}function xA(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const wA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _d(e,t,n,s,o){if(L.isFunction(s))return s.call(this,t,n);if(o&&(t=n),!!L.isString(t)){if(L.isString(s))return t.indexOf(s)!==-1;if(L.isRegExp(s))return s.test(t)}}function bA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function SA(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(o,l,c){return this[s].call(this,t,o,l,c)},configurable:!0})})}let At=class{constructor(t){t&&this.set(t)}set(t,n,s){const o=this;function l(d,f,p){const y=To(f);if(!y)return;const v=L.findKey(o,y);(!v||o[v]===void 0||p===!0||p===void 0&&o[v]!==!1)&&(o[v||f]=Hl(d))}const c=(d,f)=>L.forEach(d,(p,y)=>l(p,y,f));if(L.isPlainObject(t)||t instanceof this.constructor)c(t,n);else if(L.isString(t)&&(t=t.trim())&&!wA(t))c(hA(t),n);else if(L.isObject(t)&&L.isSafeIterable(t)){let d=Object.create(null),f,p;for(const y of t){if(!L.isArray(y))throw new TypeError("Object iterator must return a key-value pair");p=y[0],L.hasOwnProp(d,p)?(f=d[p],d[p]=L.isArray(f)?[...f,y[1]]:[f,y[1]]):d[p]=y[1]}c(d,n)}else t!=null&&l(n,t,s);return this}get(t,n){if(t=To(t),t){const s=L.findKey(this,t);if(s){const o=this[s];if(!n)return o;if(n===!0)return xA(o);if(L.isFunction(n))return n.call(this,o,s);if(L.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=To(t),t){const s=L.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||_d(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let o=!1;function l(c){if(c=To(c),c){const d=L.findKey(s,c);d&&(!n||_d(s,s[d],d,n))&&(delete s[d],o=!0)}}return L.isArray(t)?t.forEach(l):l(t),o}clear(t){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const l=n[s];(!t||_d(this,this[l],l,t,!0))&&(delete this[l],o=!0)}return o}normalize(t){const n=this,s={};return L.forEach(this,(o,l)=>{const c=L.findKey(s,l);if(c){n[c]=Hl(o),delete n[l];return}const d=t?bA(l):String(l).trim();d!==l&&delete n[l],n[d]=Hl(o),s[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return L.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=t&&L.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[Hy]=this[Hy]={accessors:{}}).accessors,o=this.prototype;function l(c){const d=To(c);s[d]||(SA(o,c),s[d]=!0)}return L.isArray(t)?t.forEach(l):l(t),this}};At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(At.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});L.freezeMethods(At);const EA="[REDACTED ****]";function CA(e){if(L.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(L.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kA(e,t){const n=new Set(t.map(l=>String(l).toLowerCase())),s=[],o=l=>{if(l===null||typeof l!="object"||L.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof At&&(l=l.toJSON()),s.push(l);let c;if(L.isArray(l))c=[],l.forEach((d,f)=>{const p=o(d);L.isUndefined(p)||(c[f]=p)});else{if(!L.isPlainObject(l)&&CA(l))return s.pop(),l;c=Object.create(null);for(const[d,f]of Object.entries(l)){const p=n.has(d.toLowerCase())?EA:o(f);L.isUndefined(p)||(c[d]=p)}}return s.pop(),c};return o(e)}let J=class Lw extends Error{static from(t,n,s,o,l,c){const d=new Lw(t.message,n||t.code,s,o,l);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),c&&Object.assign(d,c),d}constructor(t,n,s,o,l){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),l&&(this.response=l,this.status=l.status)}toJSON(){const t=this.config,n=t&&L.hasOwnProp(t,"redact")?t.redact:void 0,s=L.isArray(n)&&n.length>0?kA(t,n):L.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";J.ERR_BAD_OPTION="ERR_BAD_OPTION";J.ECONNABORTED="ECONNABORTED";J.ETIMEDOUT="ETIMEDOUT";J.ECONNREFUSED="ECONNREFUSED";J.ERR_NETWORK="ERR_NETWORK";J.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";J.ERR_DEPRECATED="ERR_DEPRECATED";J.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";J.ERR_BAD_REQUEST="ERR_BAD_REQUEST";J.ERR_CANCELED="ERR_CANCELED";J.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";J.ERR_INVALID_URL="ERR_INVALID_URL";J.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const TA=null,Mw=100;function Sf(e){return L.isPlainObject(e)||L.isArray(e)}function Fw(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function Ad(e,t,n){return e?e.concat(t).map(function(o,l){return o=Fw(o),!n&&l?"["+o+"]":o}).join(n?".":""):t}function _A(e){return L.isArray(e)&&!e.some(Sf)}const AA=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function gc(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,T){return!L.isUndefined(T[P])});const s=n.metaTokens,o=n.visitor||A,l=n.dots,c=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?Mw:n.maxDepth,p=d&&L.isSpecCompliantForm(t),y=[];if(!L.isFunction(o))throw new TypeError("visitor must be a function");function v(S){if(S===null)return"";if(L.isDate(S))return S.toISOString();if(L.isBoolean(S))return S.toString();if(!p&&L.isBlob(S))throw new J("Blob is not supported. Use a Buffer instead.");if(L.isArrayBuffer(S)||L.isTypedArray(S)){if(p&&typeof d=="function")return new d([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new J("Blob is not supported. Use a Buffer instead.",J.ERR_NOT_SUPPORT)}return S}function w(S){if(S>f)throw new J("Object is too deeply nested ("+S+" levels). Max depth: "+f,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function C(S,P){if(f===1/0)return JSON.stringify(S);const T=[];return JSON.stringify(S,function(F,U){if(!L.isObject(U))return U;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(U),w(P+T.length-1),U})}function A(S,P,T){let R=S;if(L.isReactNative(t)&&L.isReactNativeBlob(S))return t.append(Ad(T,P,l),v(S)),!1;if(S&&!T&&typeof S=="object"){if(L.endsWith(P,"{}"))P=s?P:P.slice(0,-2),S=C(S,1);else if(L.isArray(S)&&_A(S)||(L.isFileList(S)||L.endsWith(P,"[]"))&&(R=L.toArray(S)))return P=Fw(P),R.forEach(function(U,H){!(L.isUndefined(U)||U===null)&&t.append(c===!0?Ad([P],H,l):c===null?P:P+"[]",v(U))}),!1}return Sf(S)?!0:(t.append(Ad(T,P,l),v(S)),!1)}const E=Object.assign(AA,{defaultVisitor:A,convertValue:v,isVisitable:Sf});function b(S,P,T=0){if(!L.isUndefined(S)){if(w(T),y.indexOf(S)!==-1)throw new Error("Circular reference detected in "+P.join("."));y.push(S),L.forEach(S,function(F,U){(!(L.isUndefined(F)||F===null)&&o.call(t,F,L.isString(U)?U.trim():U,P,E))===!0&&b(F,P?P.concat(U):[U],T+1)}),y.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return b(e),t}function qy(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function hh(e,t){this._pairs=[],e&&gc(e,this,t)}const Iw=hh.prototype;Iw.append=function(t,n){this._pairs.push([t,n])};Iw.toString=function(t){const n=t?s=>t.call(this,s,qy):qy;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function PA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bw(e,t,n){if(!t)return e;e=e||"";const s=L.isFunction(n)?{serialize:n}:n,o=L.getSafeProp(s,"encode")||PA,l=L.getSafeProp(s,"serialize");let c;if(l?c=l(t,s):c=L.isURLSearchParams(t)?t.toString():new hh(t,s).toString(o),c){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class Ky{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(s){s!==null&&t(s)})}}const ph={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},RA=typeof URLSearchParams<"u"?URLSearchParams:hh,NA=typeof FormData<"u"?FormData:null,jA=typeof Blob<"u"?Blob:null,OA={isBrowser:!0,classes:{URLSearchParams:RA,FormData:NA,Blob:jA},protocols:["http","https","file","blob","url","data"]},mh=typeof window<"u"&&typeof document<"u",Ef=typeof navigator=="object"&&navigator||void 0,DA=mh&&(!Ef||["ReactNative","NativeScript","NS"].indexOf(Ef.product)<0),LA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MA=mh&&window.location.href||"http://localhost",FA=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mh,hasStandardBrowserEnv:DA,hasStandardBrowserWebWorkerEnv:LA,navigator:Ef,origin:MA},Symbol.toStringTag,{value:"Module"})),wt={...FA,...OA};function IA(e,t){return gc(e,new wt.classes.URLSearchParams,{visitor:function(n,s,o,l){return wt.isNode&&L.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}const Qy=Mw;function Vw(e){if(e>Qy)throw new J("FormData field is too deeply nested ("+e+" levels). Max depth: "+Qy,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function BA(e){const t=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(e))!==null;)Vw(t.length),t.push(s[0]==="[]"?"":s[1]||s[0]);return t}function VA(e){const t={},n=Object.keys(e);let s;const o=n.length;let l;for(s=0;s=n.length;return c=!c&&L.isArray(o)?o.length:c,f?(L.hasOwnProp(o,c)?o[c]=L.isArray(o[c])?o[c].concat(s):[o[c],s]:o[c]=s,!d):((!L.hasOwnProp(o,c)||!L.isObject(o[c]))&&(o[c]=[]),t(n,s,o[c],l)&&L.isArray(o[c])&&(o[c]=VA(o[c])),!d)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(s,o)=>{t(BA(s),o,n,0)}),n}return null}const ii=(e,t)=>e!=null&&L.hasOwnProp(e,t)?e[t]:void 0;function UA(e,t,n){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const ha={transitional:ph,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,l=L.isObject(t);if(l&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return o?JSON.stringify(Uw(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){const f=ii(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return IA(t,f).toString();if((d=L.isFileList(t))||s.indexOf("multipart/form-data")>-1){const p=ii(this,"env"),y=p&&p.FormData;return gc(d?{"files[]":t}:t,y&&new y,f)}}return l||o?(n.setContentType("application/json",!1),UA(t)):t}],transformResponse:[function(t){const n=ii(this,"transitional")||ha.transitional,s=n&&n.forcedJSONParsing,o=ii(this,"responseType"),l=o==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(s&&!o||l)){const d=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(t,ii(this,"parseReviver"))}catch(f){if(d)throw f.name==="SyntaxError"?J.from(f,J.ERR_BAD_RESPONSE,this,null,ii(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch","query"],e=>{ha.headers[e]={}});function Pd(e,t){const n=this||ha,s=t||n,o=At.from(s.headers);let l=s.data;return L.forEach(e,function(d){l=d.call(n,l,o.normalize(),t?t.status:void 0)}),o.normalize(),l}function zw(e){return!!(e&&e.__CANCEL__)}let pa=class extends J{constructor(t,n,s){super(t??"canceled",J.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function $w(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new J("Request failed with status code "+n.status,n.status>=400&&n.status<500?J.ERR_BAD_REQUEST:J.ERR_BAD_RESPONSE,n.config,n.request,n))}function zA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function $A(e,t){e=e||10;const n=new Array(e),s=new Array(e);let o=0,l=0,c;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),y=s[l];c||(c=p),n[o]=f,s[o]=p;let v=l,w=0;for(;v!==o;)w+=n[v++],v=v%e;if(o=(o+1)%e,o===l&&(l=(l+1)%e),p-c{n=y,o=null,l&&(clearTimeout(l),l=null),e(...p)};return[(...p)=>{const y=Date.now(),v=y-n;v>=s?c(p,y):(o=p,l||(l=setTimeout(()=>{l=null,c(o)},s-v)))},()=>o&&c(o)]}const sc=(e,t,n=3)=>{let s=0;const o=$A(50,250);return WA(l=>{if(!l||typeof l.loaded!="number")return;const c=l.loaded,d=l.lengthComputable?l.total:void 0,f=d!=null?Math.min(c,d):c,p=Math.max(0,f-s),y=o(p);s=Math.max(s,f);const v={loaded:f,total:d,progress:d?f/d:void 0,bytes:p,rate:y||void 0,estimated:y&&d?(d-f)/y:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(v)},n)},Gy=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Yy=e=>(...t)=>L.asap(()=>e(...t)),HA=wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wt.origin),wt.navigator&&/(msie|trident)/i.test(wt.navigator.userAgent)):()=>!0,qA=wt.hasStandardBrowserEnv?{write(e,t,n,s,o,l,c){if(typeof document>"u")return;const d=[`${e}=${encodeURIComponent(t)}`];L.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),L.isString(s)&&d.push(`path=${s}`),L.isString(o)&&d.push(`domain=${o}`),l===!0&&d.push("secure"),L.isString(c)&&d.push(`SameSite=${c}`),document.cookie=d.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof At?{...e}:e;function Ps(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(y,v,w,C){return L.isPlainObject(y)&&L.isPlainObject(v)?L.merge.call({caseless:C},y,v):L.isPlainObject(v)?L.merge({},v):L.isArray(v)?v.slice():v}function o(y,v,w,C){if(L.isUndefined(v)){if(!L.isUndefined(y))return s(void 0,y,w,C)}else return s(y,v,w,C)}function l(y,v){if(!L.isUndefined(v))return s(void 0,v)}function c(y,v){if(L.isUndefined(v)){if(!L.isUndefined(y))return s(void 0,y)}else return s(void 0,v)}function d(y){const v=L.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!L.isUndefined(v))if(L.isPlainObject(v)){if(L.hasOwnProp(v,y))return v[y]}else return;const w=L.hasOwnProp(e,"transitional")?e.transitional:void 0;if(L.isPlainObject(w)&&L.hasOwnProp(w,y))return w[y]}function f(y,v,w){if(L.hasOwnProp(t,w))return s(y,v);if(L.hasOwnProp(e,w))return s(void 0,y)}const p={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,allowedSocketPaths:c,responseEncoding:c,validateStatus:f,headers:(y,v,w)=>o(Jy(y),Jy(v),w,!0)};return L.forEach(Object.keys({...e,...t}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const w=L.hasOwnProp(p,v)?p[v]:o,C=L.hasOwnProp(e,v)?e[v]:void 0,A=L.hasOwnProp(t,v)?t[v]:void 0,E=w(C,A,v);L.isUndefined(E)&&w!==f||(n[v]=E)}),L.hasOwnProp(t,"validateStatus")&&L.isUndefined(t.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(L.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const ZA=["content-type","content-length"];function eP(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([s,o])=>{ZA.includes(s.toLowerCase())&&e.set(s,o)})}const tP=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Hw(e){const t=Ps({},e),n=w=>L.hasOwnProp(t,w)?t[w]:void 0,s=n("data");let o=n("withXSRFToken");const l=n("xsrfHeaderName"),c=n("xsrfCookieName");let d=n("headers");const f=n("auth"),p=n("baseURL"),y=n("allowAbsoluteUrls"),v=n("url");if(t.headers=d=At.from(d),t.url=Bw(Ww(p,v,y,t),n("params"),n("paramsSerializer")),f){const w=L.getSafeProp(f,"username")||"",C=L.getSafeProp(f,"password")||"";try{d.set("Authorization","Basic "+btoa(w+":"+(C?tP(C):"")))}catch(A){throw J.from(A,J.ERR_BAD_OPTION_VALUE,e)}}if(L.isFormData(s)&&(wt.hasStandardBrowserEnv||wt.hasStandardBrowserWebWorkerEnv||L.isReactNative(s)?d.setContentType(void 0):L.isFunction(s.getHeaders)&&eP(d,s.getHeaders(),n("formDataHeaderPolicy"))),wt.hasStandardBrowserEnv&&(L.isFunction(o)&&(o=o(t)),o===!0||o==null&&HA(t.url))){const C=l&&c&&qA.read(c);C&&d.set(l,C)}return t}const nP=typeof XMLHttpRequest<"u",rP=nP&&function(e){return new Promise(function(n,s){const o=Hw(e);let l=o.data;const c=At.from(o.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o,y,v,w,C,A;function E(){C&&C(),A&&A(),o.cancelToken&&o.cancelToken.unsubscribe(y),o.signal&&o.signal.removeEventListener("abort",y)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const T=At.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),F={data:!d||d==="text"||d==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};$w(function(H){n(H),E()},function(H){s(H),E()},F),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(S)},b.onabort=function(){b&&(s(new J("Request aborted",J.ECONNABORTED,e,b)),E(),b=null)},b.onerror=function(R){const F=R&&R.message?R.message:"Network Error",U=new J(F,J.ERR_NETWORK,e,b);U.event=R||null,s(U),E(),b=null},b.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const F=o.transitional||ph;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),s(new J(R,F.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,b)),E(),b=null},l===void 0&&c.setContentType(null),"setRequestHeader"in b&&L.forEach(Dw(c),function(R,F){b.setRequestHeader(F,R)}),L.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),d&&d!=="json"&&(b.responseType=o.responseType),p&&([w,A]=sc(p,!0),b.addEventListener("progress",w)),f&&b.upload&&([v,C]=sc(f),b.upload.addEventListener("progress",v),b.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(y=T=>{b&&(s(!T||T.type?new pa(null,e,b):T),b.abort(),E(),b=null)},o.cancelToken&&o.cancelToken.subscribe(y),o.signal&&(o.signal.aborted?y():o.signal.addEventListener("abort",y)));const P=zA(o.url);if(P&&!wt.protocols.includes(P)){s(new J("Unsupported protocol "+P+":",J.ERR_BAD_REQUEST,e)),E();return}b.send(l||null)})},sP=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const o=function(f){if(!s){s=!0,c();const p=f instanceof Error?f:this.reason;n.abort(p instanceof J?p:new pa(p instanceof Error?p.message:p))}};let l=t&&setTimeout(()=>{l=null,o(new J(`timeout of ${t}ms exceeded`,J.ETIMEDOUT))},t);const c=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o,{once:!0}));const{signal:d}=n;return d.unsubscribe=()=>L.asap(c),d},iP=function*(e,t){let n=e.byteLength;if(n{const o=oP(e,t);let l=0,c,d=f=>{c||(c=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:p,value:y}=await o.next();if(p){d(),f.close();return}let v=y.byteLength;if(n){let w=l+=v;n(w)}f.enqueue(new Uint8Array(y))}catch(p){throw d(p),p}},cancel(f){return d(f),o.return()}},{highWaterMark:2})},ic=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,lP=(e,t,n)=>t+2C>=2&&s.charCodeAt(C-2)===37&&s.charCodeAt(C-1)===51&&(s.charCodeAt(C)===68||s.charCodeAt(C)===100);p>=0&&(s.charCodeAt(p)===61?(f++,p--):y(p)&&(f++,p-=3)),f===1&&p>=0&&(s.charCodeAt(p)===61||y(p))&&f++;const w=Math.floor(c/4)*3-(f||0);return w>0?w:0}let l=0;for(let c=0,d=s.length;c=55296&&f<=56319&&c+1=56320&&p<=57343?(l+=4,c++):l+=3}else l+=3}return l}const gh="1.18.1",ev=64*1024,{isFunction:Ll}=L,uP=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),tv=e=>{if(!L.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},nv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},dP=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},fP=e=>{const t=L.global!==void 0&&L.global!==null?L.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=L.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:l,Response:c}=e,d=o?Ll(o):typeof fetch=="function",f=Ll(l),p=Ll(c);if(!d)return!1;const y=d&&Ll(n),v=d&&(typeof s=="function"?(S=>P=>S.encode(P))(new s):async S=>new Uint8Array(await new l(S).arrayBuffer())),w=f&&y&&nv(()=>{let S=!1;const P=new l(wt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),T=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),S&&!T}),C=p&&y&&nv(()=>L.isReadableStream(new c("").body)),A={stream:C&&(S=>S.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!A[S]&&(A[S]=(P,T)=>{let R=P&&P[S];if(R)return R.call(P);throw new J(`Response type '${S}' is not supported`,J.ERR_NOT_SUPPORT,T)})});const E=async S=>{if(S==null)return 0;if(L.isBlob(S))return S.size;if(L.isSpecCompliantForm(S))return(await new l(wt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(L.isArrayBufferView(S)||L.isArrayBuffer(S))return S.byteLength;if(L.isURLSearchParams(S)&&(S=S+""),L.isString(S))return(await v(S)).byteLength},b=async(S,P)=>{const T=L.toFiniteNumber(S.getContentLength());return T??E(P)};return async S=>{let{url:P,method:T,data:R,signal:F,cancelToken:U,timeout:H,onDownloadProgress:I,onUploadProgress:G,responseType:ee,headers:de,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:Z,maxBodyLength:Ae}=Hw(S);const Ce=L.isNumber(Z)&&Z>-1,ie=L.isNumber(Ae)&&Ae>-1,W=X=>L.hasOwnProp(S,X)?S[X]:void 0;let ne=o||fetch;ee=ee?(ee+"").toLowerCase():"text";let z=sP([F,U&&U.toAbortSignal()],H),O=null;const $=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let fe,pe=null;const he=()=>new J("Request body larger than maxBodyLength limit",J.ERR_BAD_REQUEST,S,O);try{let X;const be=W("auth");if(be){const ke=L.getSafeProp(be,"username")||"",pt=L.getSafeProp(be,"password")||"";X={username:ke,password:pt}}if(dP(P)){const ke=new URL(P,wt.origin);if(!X&&(ke.username||ke.password)){const pt=tv(ke.username),fn=tv(ke.password);X={username:pt,password:fn}}(ke.username||ke.password)&&(ke.username="",ke.password="",P=ke.href)}if(X&&(de.delete("authorization"),de.set("Authorization","Basic "+btoa(uP((X.username||"")+":"+(X.password||""))))),Ce&&typeof P=="string"&&P.startsWith("data:")&&cP(P)>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,O);if(ie&&T!=="get"&&T!=="head"){const ke=await E(R);if(typeof ke=="number"&&isFinite(ke)&&(fe=ke,ke>Ae))throw he()}const _e=ie&&(L.isReadableStream(R)||L.isStream(R)),me=(ke,pt,fn)=>Zy(ke,ev,hn=>{if(ie&&hn>Ae)throw pe=he();pt&&pt(hn)},fn);if(w&&T!=="get"&&T!=="head"&&(G||_e)){if(fe=fe??await b(de,R),fe!==0||_e){let ke=new l(P,{method:"POST",body:R,duplex:"half"}),pt;if(L.isFormData(R)&&(pt=ke.headers.get("content-type"))&&de.setContentType(pt),ke.body){const[fn,hn]=G&&Gy(fe,sc(Yy(G)))||[];R=me(ke.body,fn,hn)}}}else if(_e&&!f&&y&&T!=="get"&&T!=="head")R=me(R);else if(_e&&f&&!w&&T!=="get"&&T!=="head")throw new J("Stream request bodies are not supported by the current fetch implementation",J.ERR_NOT_SUPPORT,S,O);L.isString(Te)||(Te=Te?"include":"omit");const at=f&&"credentials"in l.prototype;if(L.isFormData(R)){const ke=de.getContentType();ke&&/^multipart\/form-data/i.test(ke)&&!/boundary=/i.test(ke)&&de.delete("content-type")}de.set("User-Agent","axios/"+gh,!1);const Gt={...xe,signal:z,method:T.toUpperCase(),headers:Dw(de.normalize()),body:R,duplex:"half",credentials:at?Te:void 0};O=f&&new l(P,Gt);let ht=await(f?ne(O,xe):ne(P,Gt));const dn=At.from(ht.headers);if(Ce){const ke=L.toFiniteNumber(dn.getContentLength());if(ke!=null&&ke>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,O)}const Yt=C&&(ee==="stream"||ee==="response");if(C&&ht.body&&(I||Ce||Yt&&$)){const ke={};["status","statusText","headers"].forEach(zn=>{ke[zn]=ht[zn]});const pt=L.toFiniteNumber(dn.getContentLength()),[fn,hn]=I&&Gy(pt,sc(Yy(I),!0))||[];let ir=0;const or=zn=>{if(Ce&&(ir=zn,ir>Z))throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,O);fn&&fn(zn)};ht=new c(Zy(ht.body,ev,or,()=>{hn&&hn(),$&&$()}),ke)}ee=ee||"text";let Xt=await A[L.findKey(A,ee)||"text"](ht,S);if(Ce&&!C&&!Yt){let ke;if(Xt!=null&&(typeof Xt.byteLength=="number"?ke=Xt.byteLength:typeof Xt.size=="number"?ke=Xt.size:typeof Xt=="string"&&(ke=typeof s=="function"?new s().encode(Xt).byteLength:Xt.length)),typeof ke=="number"&&ke>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,O)}return!Yt&&$&&$(),await new Promise((ke,pt)=>{$w(ke,pt,{data:Xt,headers:At.from(ht.headers),status:ht.status,statusText:ht.statusText,config:S,request:O})})}catch(X){if($&&$(),z&&z.aborted&&z.reason instanceof J){const be=z.reason;throw be.config=S,O&&(be.request=O),X!==be&&Object.defineProperty(be,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),be}if(pe)throw O&&!pe.request&&(pe.request=O),pe;if(X instanceof J)throw O&&!X.request&&(X.request=O),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const be=new J("Network Error",J.ERR_NETWORK,S,O,X&&X.response);throw Object.defineProperty(be,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),be}throw J.from(X,X&&X.code,S,O,X&&X.response)}}},hP=new Map,qw=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:o}=t,l=[s,o,n];let c=l.length,d=c,f,p,y=hP;for(;d--;)f=l[d],p=y.get(f),p===void 0&&y.set(f,p=d?new Map:fP(t)),y=p;return p};qw();const yh={http:TA,xhr:rP,fetch:{get:qw}};L.forEach(yh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rv=e=>`- ${e}`,pP=e=>L.isFunction(e)||e===null||e===!1;function mP(e,t){e=L.isArray(e)?e:[e];const{length:n}=e;let s,o;const l={};for(let c=0;c`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=n?c.length>1?`since : `+c.map(rv).join(` `):" "+rv(c[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+d,J.ERR_NOT_SUPPORT)}return o}const Kw={getAdapter:mP,adapters:yh};function Rd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function sv(e){return Rd(e),e.headers=At.from(e.headers),e.data=Pd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kw.getAdapter(e.adapter||ha.adapter,e)(e).then(function(s){Rd(e),e.response=s;try{s.data=Pd.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=At.from(s.headers),s},function(s){if(!zw(s)&&(Rd(e),s&&s.response)){e.response=s.response;try{s.response.data=Pd.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=At.from(s.response.headers)}return Promise.reject(s)})}const yc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yc[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const iv={};yc.transitional=function(t,n,s){function o(l,c){return"[Axios v"+gh+"] Transitional option '"+l+"'"+c+(s?". "+s:"")}return(l,c,d)=>{if(t===!1)throw new J(o(c," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!iv[c]&&(iv[c]=!0,console.warn(o(c," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,c,d):!0}};yc.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function gP(e,t,n){if(typeof e!="object"||e===null)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const l=s[o],c=Object.prototype.hasOwnProperty.call(t,l)?t[l]:void 0;if(c){const d=e[l],f=d===void 0||c(d,l,e);if(f!==!0)throw new J("option "+l+" must be "+f,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+l,J.ERR_BAD_OPTION)}}const ql={assertOptions:gP,validators:yc},kt=ql.validators;let Ss=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ky,response:new Ky}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=(()=>{if(!o.stack)return"";const c=o.stack.indexOf(` `);return c===-1?"":o.stack.slice(c+1)})();try{if(!s.stack)s.stack=l;else if(l){const c=l.indexOf(` `),d=c===-1?-1:l.indexOf(` `,c+1),f=d===-1?"":l.slice(d+1);String(s.stack).endsWith(f)||(s.stack+=` `+l)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ps(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:l}=n;s!==void 0&&ql.assertOptions(s,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean),legacyInterceptorReqResOrdering:kt.transitional(kt.boolean),advertiseZstdAcceptEncoding:kt.transitional(kt.boolean),validateStatusUndefinedResolves:kt.transitional(kt.boolean)},!1),o!=null&&(L.isFunction(o)?n.paramsSerializer={serialize:o}:ql.assertOptions(o,{encode:kt.function,serialize:kt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ql.assertOptions(n,{baseUrl:kt.spelling("baseURL"),withXsrfToken:kt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=l&&L.merge(l.common,l[n.method]);l&&L.forEach(["delete","get","head","post","put","patch","query","common"],A=>{delete l[A]}),n.headers=At.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(n)===!1)return;f=f&&E.synchronous;const b=n.transitional||ph;b&&b.legacyInterceptorReqResOrdering?d.unshift(E.fulfilled,E.rejected):d.push(E.fulfilled,E.rejected)});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let y,v=0,w;if(!f){const A=[sv.bind(this),void 0];for(A.unshift(...d),A.push(...p),w=A.length,y=Promise.resolve(n);v{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](o);s._listeners=null}),this.promise.then=o=>{let l;const c=new Promise(d=>{s.subscribe(d),l=d}).then(o);return c.cancel=function(){s.unsubscribe(l)},c},t(function(l,c,d){s.reason||(s.reason=new pa(l,c,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Qw(function(o){t=o}),cancel:t}}};function vP(e){return function(n){return e.apply(null,n)}}function xP(e){return L.isObject(e)&&e.isAxiosError===!0}const Cf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cf).forEach(([e,t])=>{Cf[t]=e});function Gw(e){const t=new Ss(e),n=kw(Ss.prototype.request,t);return L.extend(n,Ss.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Gw(Ps(e,o))},n}const et=Gw(ha);et.Axios=Ss;et.CanceledError=pa;et.CancelToken=yP;et.isCancel=zw;et.VERSION=gh;et.toFormData=gc;et.AxiosError=J;et.Cancel=et.CanceledError;et.all=function(t){return Promise.all(t)};et.spread=vP;et.isAxiosError=xP;et.mergeConfig=Ps;et.AxiosHeaders=At;et.formToJSON=e=>Uw(L.isHTMLForm(e)?new FormData(e):e);et.getAdapter=Kw.getAdapter;et.HttpStatusCode=Cf;et.default=et;const{Axios:xF,AxiosError:wF,CanceledError:bF,isCancel:SF,CancelToken:EF,VERSION:CF,all:kF,Cancel:TF,isAxiosError:_F,spread:AF,toFormData:PF,AxiosHeaders:RF,HttpStatusCode:NF,formToJSON:jF,getAdapter:OF,mergeConfig:DF,create:LF}=et,Yw=typeof window>"u",ov=!Yw&&window.self!==window.top,wP=!Yw&&typeof document>"u",Nd=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),yt=[];for(let e=0;e<256;++e)yt.push((e+256).toString(16).slice(1));function bP(e,t=0){return(yt[e[t+0]]+yt[e[t+1]]+yt[e[t+2]]+yt[e[t+3]]+"-"+yt[e[t+4]]+yt[e[t+5]]+"-"+yt[e[t+6]]+yt[e[t+7]]+"-"+yt[e[t+8]]+yt[e[t+9]]+"-"+yt[e[t+10]]+yt[e[t+11]]+yt[e[t+12]]+yt[e[t+13]]+yt[e[t+14]]+yt[e[t+15]]).toLowerCase()}let jd;const SP=new Uint8Array(16);function EP(){if(!jd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");jd=crypto.getRandomValues.bind(crypto)}return jd(SP)}const CP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),av={randomUUID:CP};function kP(e,t,n){var o;e=e||{};const s=e.random??((o=e.rng)==null?void 0:o.call(e))??EP();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,bP(s)}function TP(e,t,n){return av.randomUUID&&!e?av.randomUUID():kP(e)}const _o=typeof window<"u"?window:{base44SharedInstances:{}};function _P(e,t){return _o.base44SharedInstances||(_o.base44SharedInstances={}),_o.base44SharedInstances[e]||(_o.base44SharedInstances[e]={instance:t()}),_o.base44SharedInstances[e].instance}const AP="__user_heartbeat_event__",PP="__initialization_event__",RP="__session_duration_event__",lv="analytics-enable",cv="base44_analytics_session_id",NP={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},jP="analytics",Be=_P(jP,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...NP,...VP()}})),OP=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:s})=>{var o;const{maxQueueSize:l,throttleTime:c,batchSize:d}=Be.config;if(!(!((o=Be.config)===null||o===void 0)&&o.enabled)||wP)return{track:()=>{},cleanup:()=>{}};let f;const p=`${t}/api/apps/${n}/analytics/track/batch`,y=async T=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:T}})},v=T=>{try{const R=JSON.stringify({events:T}),F=new Blob([R],{type:"application/json"});return typeof navigator>"u"||R.length>6e4||!navigator.sendBeacon(p,F)}catch{return!1}},w=async(T,R={})=>{if(T.length===0)return;const F=await BP(s),U=T.map(IP(F));try{(!R.isBeacon||!v(U))&&await y(U)}catch{}},C=()=>{dv(w,{throttleTime:c,batchSize:d})},A=T=>{if(Be.requestsQueue.length>=l)return;const R=FP();Be.requestsQueue.push({...T,...R}),C()},E=()=>{dv(w,{throttleTime:c,batchSize:d}),f=fv(A),LP()},b=()=>{uv(),f==null||f(),MP(A);const T=Be.requestsQueue.splice(0);w(T,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?b():document.visibilityState==="visible"&&E())},P=()=>{uv(),f==null||f(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return C(),f=fv(A),DP(A),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:A,cleanup:P}};function uv(){Be.isProcessing=!1}async function dv(e,t){if(Be.isProcessing)return;Be.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=t??{};for(;Be.isProcessing&&Be.requestsQueue.length>0;){const o=Be.requestsQueue.splice(0,s);o.length&&await e(o),await new Promise(l=>setTimeout(l,n))}Be.isProcessing=!1}function fv(e){var t;if(Be.isHeartBeatProcessing||((t=Be.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Be.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:AP})},Be.config.heartBeatInterval);return()=>{clearInterval(n),Be.isHeartBeatProcessing=!1}}function DP(e){typeof window>"u"||Be.wasInitializationTracked||(Be.wasInitializationTracked=!0,e({eventName:PP,properties:{referrer:document==null?void 0:document.referrer}}))}function LP(){typeof window>"u"||Be.sessionStartTime!==null||(Be.sessionStartTime=new Date().toISOString())}function MP(e){if(typeof window>"u"||Be.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Be.sessionStartTime).getTime();Be.sessionStartTime=null,e({eventName:RP,properties:{sessionDuration:t}})}function FP(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function IP(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Od=null;async function BP(e){if(!Be.sessionContext){if(!Od){const t=vh();Od=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Be.sessionContext=await Od}return Be.sessionContext}function VP(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(lv);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(lv);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:t==="true"}}function vh(){if(typeof window>"u")return Nd();try{const e=localStorage.getItem(cv);if(!e){const t=Nd();return localStorage.setItem(cv,t),t}return e}catch{return Nd()}}class UP extends Error{constructor(t,n,s,o,l){super(t),this.name="Base44Error",this.status=n,this.code=s,this.data=o,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function No({baseURL:e,headers:t={},token:n,interceptResponses:s=!0,onError:o}){const l=et.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(l.defaults.headers.common.Authorization=`Bearer ${n}`),l.interceptors.request.use(c=>{typeof window<"u"&&window.location&&(c.headers.set("X-Origin-URL",window.location.href),c.headers.get("Authorization")||c.headers.set("X-Base44-Anonymous-Id",vh()));const d=TP();if(c.requestId=d,ov)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:e+c.url,method:c.method,body:c.data instanceof FormData?"[FormData object]":c.data}},"*")}catch{}return c}),s&&l.interceptors.response.use(c=>{var d;const f=(d=c.config)===null||d===void 0?void 0:d.requestId;try{ov&&f&&window.parent.postMessage({type:"api-request-end",requestId:f,data:{statusCode:c.status,response:c.data}},"*")}catch{}return c.data},c=>{var d,f,p,y,v,w,C,A;const E=((f=(d=c.response)===null||d===void 0?void 0:d.data)===null||f===void 0?void 0:f.message)||((y=(p=c.response)===null||p===void 0?void 0:p.data)===null||y===void 0?void 0:y.detail)||c.message,b=new UP(E,(v=c.response)===null||v===void 0?void 0:v.status,(C=(w=c.response)===null||w===void 0?void 0:w.data)===null||C===void 0?void 0:C.code,(A=c.response)===null||A===void 0?void 0:A.data,c);return o==null||o(b),Promise.reject(b)}),l}function hv(e){const{axios:t,appId:n,getSocket:s}=e;return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return $P(t,n,l,s)}})}function zP(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function $P(e,t,n,s){const o=`/apps/${t}/entities/${n}`;return{async list(l,c,d,f){const p={};return l&&(p.sort=l),c&&(p.limit=c),d&&(p.skip=d),f&&(p.fields=Array.isArray(f)?f.join(","):f),e.get(o,{params:p})},async filter(l,c,d,f,p){const y={q:JSON.stringify(l)};return c&&(y.sort=c),d&&(y.limit=d),f&&(y.skip=f),p&&(y.fields=Array.isArray(p)?p.join(","):p),e.get(o,{params:y})},async get(l){return e.get(`${o}/${l}`)},async create(l){return e.post(o,l)},async update(l,c){return e.put(`${o}/${l}`,c)},async delete(l){return e.delete(`${o}/${l}`)},async deleteMany(l){return e.delete(o,{data:l})},async bulkCreate(l){return e.post(`${o}/bulk`,l)},async updateMany(l,c){return e.patch(`${o}/update-many`,{query:l,data:c})},async bulkUpdate(l){return e.put(`${o}/bulk`,l)},async importEntities(l){const c=new FormData;return c.append("file",l,l.name),e.post(`${o}/import`,c,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const c=`entities:${t}:${n}`;return s().subscribeToRoom(c,{update_model:p=>{var y;const v=zP(p.data);if(v){v.type!=="delete"&&(!((y=v.data)===null||y===void 0)&&y._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${v.id}")\` to fetch the full record.`);try{l(v)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function WP(e,t){return{async call(n,s,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:c,...d}=o??{},f={...d,...l&&{path_params:l},...c&&{query_params:c}};return await e.post(`/apps/${t}/integrations/custom/${n}/${s}`,f)}}}function pv(e,t){const n=WP(e,t);return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(l,c){if(!(typeof c!="string"||c==="then"||c.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${c} must receive an object with named parameters, received: ${d}`);let f,p;return d instanceof FormData||d&&Object.values(d).some(y=>y instanceof File)?(f=new FormData,Object.keys(d).forEach(y=>{d[y]instanceof File?f.append(y,d[y],d[y].name):typeof d[y]=="object"&&d[y]!==null?f.append(y,JSON.stringify(d[y])):f.append(y,d[y])}),p="multipart/form-data"):(f=d,p="application/json"),o==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${c}`,f||d,{headers:{"Content-Type":p}}):e.post(`/apps/${t}/integration-endpoints/installable/${o}/integration-endpoints/${c}`,f||d,{headers:{"Content-Type":p}})}}})}})}function HP(){return typeof window>"u"?!1:window!==window.parent}function qP(e,t,n){const l=Math.round(window.screenX+(window.outerWidth-500)/2),c=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(e,"base44_auth",`width=500,height=600,left=${l},top=${c},resizable=yes,scrollbars=yes`);if(!d)return;const f=()=>{window.removeEventListener("message",p),clearInterval(y),d.closed||d.close()},p=v=>{var w;if(v.origin!==n||v.source!==d||!(!((w=v.data)===null||w===void 0)&&w.access_token))return;f();const C=new URL(t),{access_token:A,is_new_user:E}=v.data;C.searchParams.set("access_token",A),E!=null&&C.searchParams.set("is_new_user",String(E)),window.location.href=C.toString()},y=setInterval(()=>{d.closed&&f()},500);window.addEventListener("message",p)}function KP(e,t,n,s){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(o){return e.put(`/apps/${n}/entities/User/me`,o)},redirectToLogin(o){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const l=o?new URL(o,window.location.origin).toString():window.location.href,c=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(l)}`;window.location.href=c},loginWithProvider(o,l="/"){const c=new URL(l,window.location.origin).toString(),d=`app_id=${n}&from_url=${encodeURIComponent(c)}`;let f;o==="sso"?f=`/apps/${n}/auth/sso/login`:f=`/apps/auth${o==="google"?"":`/${o}`}/login`;const p=`${s.appBaseUrl}/api${f}?${d}`;if(HP()){const y=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return qP(y,c,window.location.origin)}window.location.href=p},logout(o){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(d){console.error("Failed to remove token from localStorage:",d)}const l=o||window.location.href,c=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(l)}`;window.location.href=c}},setToken(o,l=!0){if(o&&(e.defaults.headers.common.Authorization=`Bearer ${o}`,t.defaults.headers.common.Authorization=`Bearer ${o}`,l&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",o),window.localStorage.setItem("token",o)}catch(c){console.error("Failed to save token to localStorage:",c)}},async loginViaEmailPassword(o,l,c){var d;try{const f=await e.post(`/apps/${n}/auth/login`,{email:o,password:l,...c&&{turnstile_token:c}}),{access_token:p,user:y}=f;return p&&this.setToken(p),{access_token:p,user:y}}catch(f){throw((d=f.response)===null||d===void 0?void 0:d.status)===401&&await this.logout(),f}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(o,l){return e.post(`/apps/${n}/users/invite-user`,{user_email:o,role:l})},register(o){return e.post(`/apps/${n}/auth/register`,o)},verifyOtp({email:o,otpCode:l}){return e.post(`/apps/${n}/auth/verify-otp`,{email:o,otp_code:l})},resendOtp(o){return e.post(`/apps/${n}/auth/resend-otp`,{email:o})},resetPasswordRequest(o){return e.post(`/apps/${n}/auth/reset-password-request`,{email:o})},resetPassword({resetToken:o,newPassword:l}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:o,new_password:l})},changePassword({userId:o,currentPassword:l,newPassword:c}){return e.post(`/apps/${n}/auth/change-password`,{user_id:o,current_password:l,new_password:c})}}}function QP(e,t){return{async getAccessToken(n){const s=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(s)},async getIdToken(n){const s=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(s)}}}function GP(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const l=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await e.get(`/apps/${t}/external-auth/tokens/connectors/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}}}}function YP(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Es(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:o=!0}=e;let l=null;if(typeof window<"u"&&window.location)try{const c=new URLSearchParams(window.location.search);if(l=c.get(n),l){if(s&&XP(l,{storageKey:t}),o){c.delete(n);const d=`${window.location.pathname}${c.toString()?`?${c.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(c){console.error("Error retrieving token from URL:",c)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(t),l}catch(c){console.error("Error retrieving token from local storage:",c)}return null}function XP(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function mv(e,t,n){const s=(l,c)=>l?`${String(l).replace(/\/$/,"")}${c}`:c,o=l=>{const c=new Headers;if(n!=null&&n.getAuthHeaders){const d=n.getAuthHeaders();Object.entries(d).forEach(([f,p])=>{p!=null&&c.set(f,String(p))})}return l&&new Headers(l).forEach((d,f)=>{c.set(f,d)}),c};return{async invoke(l,c){if(typeof c=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${c}`);let d,f;return c instanceof FormData||c&&Object.values(c).some(p=>p instanceof File)?(d=new FormData,Object.keys(c).forEach(p=>{c[p]instanceof File?d.append(p,c[p],c[p].name):typeof c[p]=="object"&&c[p]!==null?d.append(p,JSON.stringify(c[p])):d.append(p,c[p])}),f="multipart/form-data"):(d=c,f="application/json"),e.post(`/apps/${t}/functions/${l}`,d||c,{headers:{"Content-Type":f}})},async fetch(l,c={}){const f=`/functions${l.startsWith("/")?l:`/${l}`}`,p=o(c.headers),y={...c,headers:p};return await fetch(s(n==null?void 0:n.baseURL,f),y)}}}function gv({axios:e,getSocket:t,appId:n,serverUrl:s,token:o}){const l=`/apps/${n}/agents`,c={},d=()=>e.get(`${l}/conversations`),f=E=>e.get(`${l}/conversations/${E}`);return{getConversations:d,getConversation:f,listConversations:E=>e.get(`${l}/conversations`,{params:E}),createConversation:E=>e.post(`${l}/conversations`,E),addMessage:async(E,b)=>e.post(`${l}/conversations/v2/${E.id}/messages`,b),subscribeToConversation:(E,b)=>{const S=`/agent-conversations/${E}`,P=t(),T=f(E).then(R=>(c[E]=R,R));return P.subscribeToRoom(S,{connect:()=>{},update_model:async({data:R})=>{const F=JSON.parse(R);if(F._message){await T;const U=F._message,H=c[E];if(H){const I=H.messages||[],G=I.findIndex(de=>de.id===U.id),ee=G!==-1?I.map((de,Te)=>Te===G?U:de):[...I,U];c[E]={...H,messages:ee},b==null||b(c[E])}}}})},getWhatsAppConnectURL:E=>{const b=`${s}/api/apps/${n}/agents/${encodeURIComponent(E)}/whatsapp`,S=o??Es();return S?`${b}?token=${S}`:b},getTelegramConnectURL:E=>{const b=`${s}/api/apps/${n}/agents/${encodeURIComponent(E)}/telegram`,S=o??Es();return S?`${b}?token=${S}`:b}}}function yv({serverUrl:e,token:t,appId:n}){return{connection:()=>{var o;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(o=t??Es())!==null&&o!==void 0?o:""}}}}function vv(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(s){await e.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await e.get(n,{params:s})},async getStats(s={}){return await e.get(`${n}/stats`,{params:s})}}}function JP(e,t){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Vn=Object.create(null);Vn.open="0";Vn.close="1";Vn.ping="2";Vn.pong="3";Vn.message="4";Vn.upgrade="5";Vn.noop="6";const Kl=Object.create(null);Object.keys(Vn).forEach(e=>{Kl[Vn[e]]=e});const kf={type:"error",data:"parser error"},Xw=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Jw=typeof ArrayBuffer=="function",Zw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xh=({type:e,data:t},n,s)=>Xw&&t instanceof Blob?n?s(t):xv(t,s):Jw&&(t instanceof ArrayBuffer||Zw(t))?n?s(t):xv(new Blob([t]),s):s(Vn[e]+(t||"")),xv=(e,t)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];t("b"+(s||""))},n.readAsDataURL(e)};function wv(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Dd;function ZP(e,t){if(Xw&&e.data instanceof Blob)return e.data.arrayBuffer().then(wv).then(t);if(Jw&&(e.data instanceof ArrayBuffer||Zw(e.data)))return t(wv(e.data));xh(e,!1,n=>{Dd||(Dd=new TextEncoder),t(Dd.encode(n))})}const bv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,s,o=0,l,c,d,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const p=new ArrayBuffer(t),y=new Uint8Array(p);for(s=0;s>4,y[o++]=(c&15)<<4|d>>2,y[o++]=(d&3)<<6|f&63;return p},tR=typeof ArrayBuffer=="function",wh=(e,t)=>{if(typeof e!="string")return{type:"message",data:e1(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:nR(e.substring(1),t)}:Kl[n]?e.length>1?{type:Kl[n],data:e.substring(1)}:{type:Kl[n]}:kf},nR=(e,t)=>{if(tR){const n=eR(e);return e1(n,t)}else return{base64:!0,data:e}},e1=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},t1="",rR=(e,t)=>{const n=e.length,s=new Array(n);let o=0;e.forEach((l,c)=>{xh(l,!1,d=>{s[c]=d,++o===n&&t(s.join(t1))})})},sR=(e,t)=>{const n=e.split(t1),s=[];for(let o=0;o{const s=n.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Ld;function Ml(e){return e.reduce((t,n)=>t+n.length,0)}function Fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let s=0;for(let o=0;oMath.pow(2,21)-1){d.enqueue(kf);break}o=y*Math.pow(2,32)+p.getUint32(4),s=3}else{if(Ml(n)e){d.enqueue(kf);break}}}})}const n1=4;function nt(e){if(e)return aR(e)}function aR(e){for(var t in nt.prototype)e[t]=nt.prototype[t];return e}nt.prototype.on=nt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};nt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};nt.prototype.off=nt.prototype.removeListener=nt.prototype.removeAllListeners=nt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,o=0;oPromise.resolve().then(t):(t,n)=>n(t,0),un=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lR="arraybuffer";function r1(e,...t){return t.reduce((n,s)=>(e.hasOwnProperty(s)&&(n[s]=e[s]),n),{})}const cR=un.setTimeout,uR=un.clearTimeout;function xc(e,t){t.useNativeTimers?(e.setTimeoutFn=cR.bind(un),e.clearTimeoutFn=uR.bind(un)):(e.setTimeoutFn=un.setTimeout.bind(un),e.clearTimeoutFn=un.clearTimeout.bind(un))}const dR=1.33;function fR(e){return typeof e=="string"?hR(e):Math.ceil((e.byteLength||e.size)*dR)}function hR(e){let t=0,n=0;for(let s=0,o=e.length;s=57344?n+=3:(s++,n+=4);return n}function s1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pR(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function mR(e){let t={},n=e.split("&");for(let s=0,o=n.length;s{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};sR(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,rR(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=s1()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let i1=!1;try{i1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const vR=i1;function xR(){}class wR extends yR{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,n){const s=this.request({method:"POST",data:t});s.on("success",n),s.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=t}}class Ln extends nt{constructor(t,n,s){super(),this.createRequest=t,xc(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const n=r1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Ln.requestsCount++,Ln.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=xR,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ln.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ln.requestsCount=0;Ln.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Sv);else if(typeof addEventListener=="function"){const e="onpagehide"in un?"pagehide":"unload";addEventListener(e,Sv,!1)}}function Sv(){for(let e in Ln.requests)Ln.requests.hasOwnProperty(e)&&Ln.requests[e].abort()}const bR=(function(){const e=o1({xdomain:!1});return e&&e.responseType!==null})();class SR extends wR{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=bR&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ln(o1,this.uri(),t)}}function o1(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||vR))return new XMLHttpRequest}catch{}if(!t)try{return new un[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const a1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ER extends bh{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,s=a1?{}:r1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{try{this.doWrite(s,l)}catch{}o&&vc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=s1()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Md=un.WebSocket||un.MozWebSocket;class CR extends ER{createSocket(t,n,s){return a1?new Md(t,n,s):n?new Md(t,n):new Md(t)}doWrite(t,n){this.ws.send(n)}}class kR extends bh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=oR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(n).getReader(),o=iR();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const l=()=>{s.read().then(({done:d,value:f})=>{d||(this.onPacket(f),l())}).catch(d=>{})};l();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n{o&&vc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const TR={websocket:CR,webtransport:kR,polling:SR},_R=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,AR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Tf(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),s=e.indexOf("]");n!=-1&&s!=-1&&(e=e.substring(0,n)+e.substring(n,s).replace(/:/g,";")+e.substring(s,e.length));let o=_R.exec(e||""),l={},c=14;for(;c--;)l[AR[c]]=o[c]||"";return n!=-1&&s!=-1&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=PR(l,l.path),l.queryKey=RR(l,l.query),l}function PR(e,t){const n=/\/{2,9}/g,s=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function RR(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,l){o&&(n[o]=l)}),n}const _f=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ql=[];_f&&addEventListener("offline",()=>{Ql.forEach(e=>e())},!1);class Ur extends nt{constructor(t,n){if(super(),this.binaryType=lR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const s=Tf(t);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=Tf(n.host).host);xc(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=mR(this.opts.query)),_f&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ql.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=n1,n.transport=t,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ur.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ur.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,vc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,s){return this._sendPacket("message",t,n,s),this}send(t,n,s){return this._sendPacket("message",t,n,s),this}_sendPacket(t,n,s,o){if(typeof n=="function"&&(o=n,n=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:t,data:n,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(Ur.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),_f&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Ql.indexOf(this._offlineEventListener);s!==-1&&Ql.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ur.protocol=n1;class NR extends Ur{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",v=>{if(!s)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ur.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(y(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){s||(s=!0,y(),n.close(),n=null)}const c=v=>{const w=new Error("probe error: "+v);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function d(){c("transport closed")}function f(){c("socket closed")}function p(v){n&&v.name!==n.name&&l()}const y=()=>{n.removeListener("open",o),n.removeListener("error",c),n.removeListener("close",d),this.off("close",f),this.off("upgrading",p)};n.once("open",o),n.once("error",c),n.once("close",d),this.once("close",f),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let s=0;sTR[l]).filter(l=>!!l)),super(s?o:t,o)}};function OR(e,t="",n){let s=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),s=Tf(e)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+t,s.href=s.protocol+"://"+l+(n&&n.port===s.port?"":":"+s.port),s}const DR=typeof ArrayBuffer=="function",LR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,l1=Object.prototype.toString,MR=typeof Blob=="function"||typeof Blob<"u"&&l1.call(Blob)==="[object BlobConstructor]",FR=typeof File=="function"||typeof File<"u"&&l1.call(File)==="[object FileConstructor]";function Sh(e){return DR&&(e instanceof ArrayBuffer||LR(e))||MR&&e instanceof Blob||FR&&e instanceof File}function Gl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,s=e.length;n=0&&e.numthis.opts.maxAttachments)throw new Error("too many attachments");s.attachments=d}if(t.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););s.nsp=t.substring(l,n)}else s.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const c=t.charAt(n);if(c==null||Number(c)!=c){--n;break}if(n===t.length)break}s.id=Number(t.substring(l,n+1))}if(t.charAt(++n)){const l=this.tryParse(t.substr(n));if(Eh.isPayloadValid(s.type,l))s.data=l;else throw new Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Oe.CONNECT:return Ev(n);case Oe.DISCONNECT:return n===void 0;case Oe.CONNECT_ERROR:return typeof n=="string"||Ev(n);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&VR.indexOf(n[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zR{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=BR(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $R=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Ev(e){return Object.prototype.toString.call(e)==="[object Object]"}const WR=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Eh,Encoder:UR,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function Cn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const HR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class c1 extends nt{constructor(t,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Cn(t,"open",this.onopen.bind(this)),Cn(t,"packet",this.onpacket.bind(this)),Cn(t,"error",this.onerror.bind(this)),Cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var s,o,l;if(HR.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const c={type:Oe.EVENT,data:n};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const y=this.ids++,v=n.pop();this._registerAckCallback(y,v),c.id=y}const d=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(t,n){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let d=0;d{this.io.clearTimeoutFn(l),n.apply(this,d)};c.withError=!0,this.acks[t]=c}emitWithAck(t,...n){return new Promise((s,o)=>{const l=(c,d)=>c?o(c):s(d);l.withError=!0,n.push(l),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...l)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Oe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(t);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(t);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let s=!1;return function(...o){s||(s=!0,n.packet({type:Oe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let s=0;s0&&e.jitter<=1?e.jitter:0,this.attempts=0}Mi.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Mi.prototype.reset=function(){this.attempts=0};Mi.prototype.setMin=function(e){this.ms=e};Mi.prototype.setMax=function(e){this.max=e};Mi.prototype.setJitter=function(e){this.jitter=e};class Rf extends nt{constructor(t,n){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,xc(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Mi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||WR;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new jR(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Cn(n,"open",function(){s.onopen(),t&&t()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),t?t(d):this.maybeReconnectOnOpen()},c=Cn(n,"error",l);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Cn(t,"ping",this.onping.bind(this)),Cn(t,"data",this.ondata.bind(this)),Cn(t,"error",this.onerror.bind(this)),Cn(t,"close",this.onclose.bind(this)),Cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new c1(this,t,n),this.nsps[t]=s),s}_destroy(t){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ao={};function Yl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=OR(e,t.path||"/socket.io"),s=n.source,o=n.id,l=n.path,c=Ao[o]&&l in Ao[o].nsps,d=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let f;return d?f=new Rf(s,t):(Ao[o]||(Ao[o]=new Rf(s,t)),f=Ao[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(Yl,{Manager:Rf,Socket:c1,io:Yl,connect:Yl});const qR=250;function Cv(e,t){var n;const s=(n=e.token)!==null&&n!==void 0?n:Es(),o={app_id:e.appId,token:s};s||(o.anonymous_id=vh());const l=Yl(e.serverUrl,{path:e.mountPath,transports:e.transports,query:o});return l.on("connect",async()=>{var c;return console.log("connect",l.id),(c=t.connect)===null||c===void 0?void 0:c.call(t)}),l.on("update_model",async c=>{var d;return(d=t.update_model)===null||d===void 0?void 0:d.call(t,c)}),l.on("error",async c=>{var d;return(d=t.error)===null||d===void 0?void 0:d.call(t,c)}),l.on("connect_error",async c=>{var d;return console.error("connect_error",c),(d=t.error)===null||d===void 0?void 0:d.call(t,c)}),l}function KR({config:e}){let t={...e};const n={},s={},o={connect:async()=>{const S=[];Object.keys(n).forEach(P=>{const T=w(P);T.length!==0&&(p(P),T.forEach(({connect:R})=>{const F=async()=>R==null?void 0:R();S.push(F())}))}),await Promise.all(S)},update_model:async S=>{const T=w(S.room).map(R=>{var F;return(F=R.update_model)===null||F===void 0?void 0:F.call(R,S)});await Promise.all(T)},error:async S=>{console.error("error",S);const P=Object.values(n).flat().map(T=>{var R;return(R=T.error)===null||R===void 0?void 0:R.call(T,S)});await Promise.all(P)}};let l=Cv(e,o);function c(){d()}function d(){A(),l&&l.disconnect()}function f(S){c(),t={...t,...S},l=Cv(t,o)}function p(S){l.emit("join",S)}function y(S){l.emit("leave",S)}async function v(S,P){var T;const R=JSON.stringify(P);return(T=o.update_model)===null||T===void 0?void 0:T.call(o,{room:S,data:R})}function w(S){var P;return(P=n[S])!==null&&P!==void 0?P:[]}function C(S){const P=s[S];P&&(clearTimeout(P),delete s[S])}function A(){Object.keys(s).forEach(S=>{var P,T;clearTimeout(s[S]),delete s[S],((T=(P=n[S])===null||P===void 0?void 0:P.length)!==null&&T!==void 0?T:0)===0&&delete n[S]})}function E(S){C(S),s[S]=setTimeout(()=>{var P,T;delete s[S],!(((T=(P=n[S])===null||P===void 0?void 0:P.length)!==null&&T!==void 0?T:0)>0)&&(y(S),delete n[S])},qR)}return{socket:l,subscribeToRoom:(S,P)=>{n[S]?C(S):(p(S),n[S]=[]),n[S].push(P);let T=!1;return()=>{var R,F;T||(T=!0,n[S]=(F=(R=n[S])===null||R===void 0?void 0:R.filter(U=>U!==P))!==null&&F!==void 0?F:[],n[S].length===0&&E(S))}},updateConfig:f,updateModel:v,disconnect:d}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var u1=class extends Event{constructor(t,n){super("error",n);Me(this,"message");Me(this,"error");this.message=t.message,this.error=t}},d1=class extends Event{constructor(t=1e3,n="",s){super("close",s);Me(this,"code");Me(this,"reason");Me(this,"wasClean",!0);this.code=t,this.reason=n}},Fd={Event,ErrorEvent:u1,CloseEvent:d1};function QR(e,t){if(!e)throw new Error(t)}function GR(e){return new e.constructor(e.type,e)}function YR(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new d1(e.code||1999,e.reason||"unknown reason",e):"error"in e?new u1(e.error,e):new Event(e.type,e)}var rx,XR=typeof process<"u"&&typeof((rx=process.versions)==null?void 0:rx.node)<"u"&&typeof document>"u",Il=XR?YR:GR,is={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},kv=!1,JR=class as extends EventTarget{constructor(n,s,o={}){super();Me(this,"_ws");Me(this,"_retryCount",-1);Me(this,"_uptimeTimeout");Me(this,"_connectTimeout");Me(this,"_shouldReconnect",!0);Me(this,"_connectLock",!1);Me(this,"_binaryType","blob");Me(this,"_closeCalled",!1);Me(this,"_messageQueue",[]);Me(this,"_url");Me(this,"_protocols");Me(this,"_options");Me(this,"onclose",null);Me(this,"onerror",null);Me(this,"onmessage",null);Me(this,"onopen",null);Me(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=is.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),QR(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var l;return(l=this._ws)==null?void 0:l.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Il(n))});Me(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Il(n))});Me(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Il(n)),this._connect()});Me(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Il(n))});this._url=n,this._protocols=s,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return as.CONNECTING}get OPEN(){return as.OPEN}get CLOSING(){return as.CLOSING}get CLOSED(){return as.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,o)=>(typeof o=="string"?s+=o.length:o instanceof Blob?s+=o.size:s+=o.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?as.CLOSED:as.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=is.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=is.reconnectionDelayGrowFactor,minReconnectionDelay:s=is.minReconnectionDelay,maxReconnectionDelay:o=is.maxReconnectionDelay}=this._options;let l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>o&&(l=o)),this._debug("next delay",l),l}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=is.maxRetries,connectionTimeout:s=is.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,l])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!kv&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),kv=!0);const c=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:l}),this._ws=l?new c(o,l):new c(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(o=>{this._connectLock=!1,this._handleError(new Fd.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new Fd.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new Fd.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var ZR=e=>e[1]!==null&&e[1]!==void 0;function eN(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let s=Math.random()*16;return e>0?(s=(e+s)%16|0,e=Math.floor(e/16)):(s=(t+s)%16|0,t=Math.floor(t/16)),(n==="x"?s:s&3|8).toString(16)})}function f1(e,t,n={}){const{host:s,path:o,protocol:l,room:c,party:d,query:f}=e;let p=s.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const y=d??"main",v=o?`/${o}`:"",w=l||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?t:t+"s"),C=`${w}://${p}/${d?`parties/${d}`:"party"}/${c}${v}`,A=(b={})=>`${C}?${new URLSearchParams([...Object.entries(n),...Object.entries(b).filter(ZR)])}`,E=typeof f=="function"?async()=>A(await f()):A(f);return{host:p,path:v,room:c,name:y,protocol:w,partyUrl:C,urlProvider:E}}var tN=class extends JR{constructor(t){const n=Tv(t);super(n.urlProvider,n.protocols,n.socketOptions);Me(this,"_pk");Me(this,"_pkurl");Me(this,"name");Me(this,"room");Me(this,"host");Me(this,"path");this.partySocketOptions=t,this.setWSProperties(n)}updateProperties(t){const n=Tv({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(t){const{_pk:n,_pkurl:s,name:o,room:l,host:c,path:d}=t;this._pk=n,this._pkurl=s,this.name=o,this.room=l,this.host=c,this.path=d}reconnect(t,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,n){const s=f1(t,"http"),o=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(t.fetch??fetch)(o,n)}};function Tv(e){const{id:t,host:n,path:s,party:o,room:l,protocol:c,query:d,protocols:f,...p}=e,y=t||eN(),v=f1(e,"ws",{_pk:y});return{_pk:y,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:f,socketOptions:p,urlProvider:v.urlProvider}}const nN=1e3,rN=3e3;class sN{constructor(t,n,s,o,l){var c;this.onClose=l,this.listeners=new Set,this.heartbeat=null,this.id=(c=o==null?void 0:o.id)!==null&&c!==void 0?c:crypto.randomUUID();const d=new tN({host:s.host,party:t,room:n,id:this.id,query:()=>{const y=s.getAuthToken();return{app_id:s.appId,handler:t,...y?{token:y}:{},...s.functionsVersion?{fv:s.functionsVersion}:{}}}});this.ws=d;let f=Date.now();const p=()=>{f=Date.now()};d.addEventListener("open",p),d.addEventListener("message",y=>{p();let v;try{v=JSON.parse(y.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const C of this.listeners)C(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>rN){p(),d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},nN)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function iN(e,t,n,s){let o=null;return{connect(l){if(o)return o;const c=new sN(e,t,n,l,()=>{s.delete(c),o===c&&(o=null)});return o=c,s.add(c),c}}}function oN(e,t){return e&&!e.startsWith("/")?e:t??e}function aN(e){const t=new Set;return{module:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"))return l=>iN(o,l,e,t)}}),closeAll:()=>{for(const s of[...t])s.close()}}}function lN(e){var t,n,s;const{serverUrl:o="https://base44.app",appId:l,token:c,serviceToken:d,requiresAuth:f=!1,appBaseUrl:p,options:y,functionsVersion:v,headers:w}=e,C=typeof p=="string"?p:"",A={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:c};let E=null;const b=()=>(E||(E=KR({config:A})),E),S={...w,"X-App-Id":String(l)},P=v?{...S,"Base44-Functions-Version":v}:S,T=No({baseURL:`${o}/api`,headers:S,token:c,onError:y==null?void 0:y.onError}),R=No({baseURL:`${o}/api`,headers:P,token:c,interceptResponses:!1,onError:y==null?void 0:y.onError}),F={...S,...c?{"on-behalf-of":`Bearer ${c}`}:{}},U=No({baseURL:`${o}/api`,headers:F,token:d,onError:y==null?void 0:y.onError}),H=No({baseURL:`${o}/api`,headers:P,token:d,interceptResponses:!1}),I=KP(T,R,l,{appBaseUrl:C});if(typeof window<"u"){const xe=c||Es();xe&&I.setToken(xe)}const G=aN({appId:l,host:oN(o,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:v,getAuthToken:()=>c||Es()}),ee={entities:hv({axios:T,appId:l,getSocket:b}),integrations:pv(T,l),connectors:YP(T,l),auth:I,functions:mv(R,l,{getAuthHeaders:()=>{const xe={},Z=c||Es();return Z&&(xe.Authorization=`Bearer ${Z}`),xe},baseURL:(n=R.defaults)===null||n===void 0?void 0:n.baseURL}),agents:gv({axios:T,getSocket:b,appId:l,serverUrl:o,token:c}),aiGateway:yv({serverUrl:o,token:c,appId:l}),appLogs:vv(T,l),users:JP(T,l),analytics:OP({axiosClient:T,serverUrl:o,appId:l,userAuthModule:I}),actors:G.module,cleanup:()=>{ee.analytics.cleanup(),G.closeAll(),E&&E.disconnect()}},de={entities:hv({axios:U,appId:l,getSocket:b}),integrations:pv(U,l),sso:QP(U,l),connectors:GP(U,l),functions:mv(H,l,{getAuthHeaders:()=>{const xe={};return d&&(xe.Authorization=`Bearer ${d}`),xe},baseURL:(s=H.defaults)===null||s===void 0?void 0:s.baseURL}),agents:gv({axios:U,getSocket:b,appId:l,serverUrl:o,token:c}),aiGateway:yv({serverUrl:o,token:d,appId:l}),appLogs:vv(U,l),cleanup:()=>{E&&E.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await ee.auth.isAuthenticated()||ee.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ee.auth.redirectToLogin(window.location.href)}},0),{...ee,setToken(xe){ee.auth.setToken(xe),E&&E.updateConfig({token:xe}),A.token=xe},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return de}}}const h1=typeof window>"u",cN=h1?{localStorage:new Map}:window,Vo=cN.localStorage,uN=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),oi=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(h1)return t;const s=`base44_${uN(e)}`,o=new URLSearchParams(window.location.search),l=o.get(e);if(n){o.delete(e);const d=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return Vo.setItem(s,l),l;if(t)return Vo.setItem(s,t),t;const c=Vo.getItem(s);return c||null},dN=()=>(oi("clear_access_token")==="true"&&(Vo.removeItem("base44_access_token"),Vo.removeItem("token")),{appId:oi("app_id",{defaultValue:"6a7b00168bc3a29a795c74cd"}),token:oi("access_token",{removeFromUrl:!0}),fromUrl:oi("from_url",{defaultValue:window.location.href}),functionsVersion:oi("functions_version",{defaultValue:"prod"}),appBaseUrl:oi("app_base_url",{defaultValue:void 0})}),Oo={...dN()},{appId:fN,token:hN,functionsVersion:pN,appBaseUrl:mN}=Oo,Do=lN({appId:fN,token:hN,functionsVersion:pN,serverUrl:"",requiresAuth:!1,appBaseUrl:mN});function gN({}){var o;const t=Oi().pathname.substring(1),{data:n,isFetched:s}=gT({queryKey:["user"],queryFn:async()=>{try{return{user:await Do.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return m.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:m.jsx("div",{className:"max-w-md w-full",children:m.jsxs("div",{className:"text-center space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),m.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),m.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",m.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&m.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:m.jsxs("div",{className:"flex items-start space-x-3",children:[m.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:m.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),m.jsxs("div",{className:"text-left space-y-1",children:[m.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),m.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),m.jsx("div",{className:"pt-6",children:m.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[m.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const p1=k.createContext(),yN=({children:e})=>{const[t,n]=k.useState(null),[s,o]=k.useState(!1),[l,c]=k.useState(!0),[d,f]=k.useState(!0),[p,y]=k.useState(null),[v,w]=k.useState(!1),[C,A]=k.useState(null);k.useEffect(()=>{E()},[]);const E=async()=>{var T,R;try{f(!0),y(null);const F=No({baseURL:"/api/apps/public",headers:{"X-App-Id":Oo.appId},token:Oo.token,interceptResponses:!0});try{const U=await F.get(`/prod/public-settings/by-id/${Oo.appId}`);A(U),Oo.token?await b():(c(!1),o(!1),w(!0)),f(!1)}catch(U){if(console.error("App state check failed:",U),U.status===403&&((R=(T=U.data)==null?void 0:T.extra_data)!=null&&R.reason)){const H=U.data.extra_data.reason;y(H==="auth_required"?{type:"auth_required",message:"Authentication required"}:H==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:H,message:U.message})}else y({type:"unknown",message:U.message||"Failed to load app"});f(!1),c(!1)}}catch(F){console.error("Unexpected error:",F),y({type:"unknown",message:F.message||"An unexpected error occurred"}),f(!1),c(!1)}},b=async()=>{try{c(!0);const T=await Do.auth.me();n(T),o(!0),c(!1),w(!0)}catch(T){console.error("User auth check failed:",T),c(!1),o(!1),w(!0),(T.status===401||T.status===403)&&y({type:"auth_required",message:"Authentication required"})}},S=(T=!0)=>{n(null),o(!1),T?Do.auth.logout(window.location.href):Do.auth.logout()},P=()=>{Do.auth.redirectToLogin(window.location.href)};return m.jsx(p1.Provider,{value:{user:t,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:p,appPublicSettings:C,authChecked:v,logout:S,navigateToLogin:P,checkUserAuth:b,checkAppState:E},children:e})},vN=()=>{const e=k.useContext(p1);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},xN=()=>m.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:m.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:m.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),m.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),m.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),m.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[m.jsx("p",{children:"If you believe this is an error, you can:"}),m.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[m.jsx("li",{children:"Verify you are logged in with the correct account"}),m.jsx("li",{children:"Contact the app administrator for access"}),m.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),wN=e=>{const t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function bN(){const{pathname:e,hash:t}=Oi(),n=KT();return k.useEffect(()=>{if(n!=="POP"){if(t){const s=wN(t),o=window.setTimeout(()=>{var l;(l=document.getElementById(s))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[e,t,n]),null}const m1=k.createContext({});function Ch(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const kh=k.createContext(null),Th=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function SN(e=!0){const t=k.useContext(kh);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=t,l=k.useId();k.useEffect(()=>{e&&o(l)},[e]);const c=k.useCallback(()=>e&&s&&s(l),[l,s,e]);return!n&&s?[!1,c]:[!0]}const _h=typeof window<"u",g1=_h?k.useLayoutEffect:k.useEffect,Kt=e=>e;let y1=Kt;function Ah(e){let t;return()=>(t===void 0&&(t=e()),t)}const Rs=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},Mn=e=>e*1e3,Fn=e=>e/1e3,EN={useManualTiming:!1};function CN(e){let t=new Set,n=new Set,s=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(f.schedule(p),e()),p(c)}const f={schedule:(p,y=!1,v=!1)=>{const C=v&&s?t:n;return y&&l.add(p),C.has(p)||C.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(c=p,s){o=!0;return}s=!0,[t,n]=[n,t],t.forEach(d),t.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const Bl=["read","resolveKeyframes","update","preRender","render","postRender"],kN=40;function v1(e,t){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Bl.reduce((S,P)=>(S[P]=CN(l),S),{}),{read:d,resolveKeyframes:f,update:p,preRender:y,render:v,postRender:w}=c,C=()=>{const S=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(S-o.timestamp,kN),1),o.timestamp=S,o.isProcessing=!0,d.process(o),f.process(o),p.process(o),y.process(o),v.process(o),w.process(o),o.isProcessing=!1,n&&t&&(s=!1,e(C))},A=()=>{n=!0,s=!0,o.isProcessing||e(C)};return{schedule:Bl.reduce((S,P)=>{const T=c[P];return S[P]=(R,F=!1,U=!1)=>(n||A(),T.schedule(R,F,U)),S},{}),cancel:S=>{for(let P=0;P_v[e].some(n=>!!t[n])};function TN(e){for(const t in e)_i[t]={..._i[t],...e[t]}}const _N=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function oc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_N.has(e)}let w1=e=>!oc(e);function AN(e){e&&(w1=t=>t.startsWith("on")?!oc(t):e(t))}try{AN(require("@emotion/is-prop-valid").default)}catch{}function PN(e,t,n){const s={};for(const o in e)o==="values"&&typeof e.values=="object"||(w1(o)||n===!0&&oc(o)||!t&&!oc(o)||e.draggable&&o.startsWith("onDrag"))&&(s[o]=e[o]);return s}function RN(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const wc=k.createContext({});function Jo(e){return typeof e=="string"||Array.isArray(e)}function bc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ph=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rh=["initial",...Ph];function Sc(e){return bc(e.animate)||Rh.some(t=>Jo(e[t]))}function b1(e){return!!(Sc(e)||e.variants)}function NN(e,t){if(Sc(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Jo(n)?n:void 0,animate:Jo(s)?s:void 0}}return e.inherit!==!1?t:{}}function jN(e){const{initial:t,animate:n}=NN(e,k.useContext(wc));return k.useMemo(()=>({initial:t,animate:n}),[Av(t),Av(n)])}function Av(e){return Array.isArray(e)?e.join(" "):e}const ON=Symbol.for("motionComponentSymbol");function li(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function DN(e,t,n){return k.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):li(n)&&(n.current=s))},[t])}const Nh=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),LN="framerAppearId",S1="data-"+Nh(LN),{schedule:jh}=v1(queueMicrotask,!1),E1=k.createContext({});function MN(e,t,n,s,o){var l,c;const{visualElement:d}=k.useContext(wc),f=k.useContext(x1),p=k.useContext(kh),y=k.useContext(Th).reducedMotion,v=k.useRef(null);s=s||f.renderer,!v.current&&s&&(v.current=s(e,{visualState:t,parent:d,props:n,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:y}));const w=v.current,C=k.useContext(E1);w&&!w.projection&&o&&(w.type==="html"||w.type==="svg")&&FN(v.current,n,o,C);const A=k.useRef(!1);k.useInsertionEffect(()=>{w&&A.current&&w.update(n,p)});const E=n[S1],b=k.useRef(!!E&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,E))&&((c=window.MotionHasOptimisedAnimation)===null||c===void 0?void 0:c.call(window,E)));return g1(()=>{w&&(A.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),jh.render(w.render),b.current&&w.animationState&&w.animationState.animateChanges())}),k.useEffect(()=>{w&&(!b.current&&w.animationState&&w.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)===null||S===void 0||S.call(window,E)}),b.current=!1))}),w}function FN(e,t,n,s){const{layoutId:o,layout:l,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:C1(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||d&&li(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:f,layoutRoot:p})}function C1(e){if(e)return e.options.allowProjection!==!1?e.projection:C1(e.parent)}function IN({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:o}){var l,c;e&&TN(e);function d(p,y){let v;const w={...k.useContext(Th),...p,layoutId:BN(p)},{isStatic:C}=w,A=jN(p),E=s(p,C);if(!C&&_h){VN();const b=UN(w);v=b.MeasureLayout,A.visualElement=MN(o,E,w,t,b.ProjectionNode)}return m.jsxs(wc.Provider,{value:A,children:[v&&A.visualElement?m.jsx(v,{visualElement:A.visualElement,...w}):null,n(o,p,DN(E,A.visualElement,y),E,C,A.visualElement)]})}d.displayName=`motion.${typeof o=="string"?o:`create(${(c=(l=o.displayName)!==null&&l!==void 0?l:o.name)!==null&&c!==void 0?c:""})`}`;const f=k.forwardRef(d);return f[ON]=o,f}function BN({layoutId:e}){const t=k.useContext(m1).id;return t&&e!==void 0?t+"-"+e:e}function VN(e,t){k.useContext(x1).strict}function UN(e){const{drag:t,layout:n}=_i;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const zN=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Oh(e){return typeof e!="string"||e.includes("-")?!1:!!(zN.indexOf(e)>-1||/[A-Z]/u.test(e))}function Pv(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Dh(e,t,n,s){if(typeof t=="function"){const[o,l]=Pv(s);t=t(n!==void 0?n:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=Pv(s);t=t(n!==void 0?n:e.custom,o,l)}return t}const Nf=e=>Array.isArray(e),$N=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WN=e=>Nf(e)?e[e.length-1]||0:e,ft=e=>!!(e&&e.getVelocity);function Xl(e){const t=ft(e)?e.get():e;return $N(t)?t.toValue():t}function HN({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,o,l){const c={latestValues:qN(s,o,l,e),renderState:t()};return n&&(c.onMount=d=>n({props:s,current:d,...c}),c.onUpdate=d=>n(d)),c}const k1=e=>(t,n)=>{const s=k.useContext(wc),o=k.useContext(kh),l=()=>HN(e,t,s,o);return n?l():Ch(l)};function qN(e,t,n,s){const o={},l=s(e,{});for(const w in l)o[w]=Xl(l[w]);let{initial:c,animate:d}=e;const f=Sc(e),p=b1(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let y=n?n.initial===!1:!1;y=y||c===!1;const v=y?d:c;if(v&&typeof v!="boolean"&&!bc(v)){const w=Array.isArray(v)?v:[v];for(let C=0;Ct=>typeof t=="string"&&t.startsWith(e),_1=T1("--"),KN=T1("var(--"),Lh=e=>KN(e)?QN.test(e.split("/*")[0].trim()):!1,QN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,A1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,rr=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Zo={...Ii,transform:e=>rr(0,1,e)},Vl={...Ii,default:1},ma=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=ma("deg"),In=ma("%"),we=ma("px"),GN=ma("vh"),YN=ma("vw"),Rv={...In,parse:e=>In.parse(e)/100,transform:e=>In.transform(e*100)},XN={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},JN={rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:Vl,scaleX:Vl,scaleY:Vl,scaleZ:Vl,skew:Pr,skewX:Pr,skewY:Pr,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Zo,originX:Rv,originY:Rv,originZ:we},Nv={...Ii,transform:Math.round},Mh={...XN,...JN,zIndex:Nv,size:we,fillOpacity:Zo,strokeOpacity:Zo,numOctaves:Nv},ZN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ej=Fi.length;function tj(e,t,n){let s="",o=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),P1=()=>({...Bh(),attrs:{}}),Vh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function R1(e,{style:t,vars:n},s,o){Object.assign(e.style,t,o&&o.getProjectionStyles(s));for(const l in n)e.style.setProperty(l,n[l])}const N1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function j1(e,t,n,s){R1(e,t,void 0,s);for(const o in t.attrs)e.setAttribute(N1.has(o)?o:Nh(o),t.attrs[o])}const ac={};function oj(e){Object.assign(ac,e)}function O1(e,{layout:t,layoutId:n}){return Ds.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ac[e]||e==="opacity")}function Uh(e,t,n){var s;const{style:o}=e,l={};for(const c in o)(ft(o[c])||t.style&&ft(t.style[c])||O1(c,e)||((s=n==null?void 0:n.getValue(c))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(l[c]=o[c]);return l}function D1(e,t,n){const s=Uh(e,t,n);for(const o in e)if(ft(e[o])||ft(t[o])){const l=Fi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=e[o]}return s}function aj(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Ov=["x","y","width","height","cx","cy","r"],lj={useVisualState:k1({scrapeMotionValuesFromProps:D1,createRenderState:P1,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:o})=>{if(!n)return;let l=!!e.drag;if(!l){for(const d in o)if(Ds.has(d)){l=!0;break}}if(!l)return;let c=!t;if(t)for(let d=0;d{aj(n,s),Ue.render(()=>{Ih(s,o,Vh(n.tagName),e.transformTemplate),j1(n,s)})})}})},cj={useVisualState:k1({scrapeMotionValuesFromProps:Uh,createRenderState:Bh})};function L1(e,t,n){for(const s in t)!ft(t[s])&&!O1(s,n)&&(e[s]=t[s])}function uj({transformTemplate:e},t){return k.useMemo(()=>{const n=Bh();return Fh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dj(e,t){const n=e.style||{},s={};return L1(s,n,e),Object.assign(s,uj(e,t)),s}function fj(e,t){const n={},s=dj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function hj(e,t,n,s){const o=k.useMemo(()=>{const l=P1();return Ih(l,t,Vh(s),e.transformTemplate),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};L1(l,e.style,e),o.style={...l,...o.style}}return o}function pj(e=!1){return(n,s,o,{latestValues:l},c)=>{const f=(Oh(n)?hj:fj)(s,l,c,n),p=PN(s,typeof n=="string",e),y=n!==k.Fragment?{...p,...f,ref:o}:{},{children:v}=s,w=k.useMemo(()=>ft(v)?v.get():v,[v]);return k.createElement(n,{...y,children:w})}}function mj(e,t){return function(s,{forwardMotionProps:o}={forwardMotionProps:!1}){const c={...Oh(s)?lj:cj,preloadedFeatures:e,useRender:pj(o),createVisualElement:t,Component:s};return IN(c)}}function M1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;swindow.ScrollTimeline!==void 0);class yj{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s{if(gj()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{s.forEach((o,l)=>{o&&o(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class F1 extends yj{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function zh(e,t){return e?e[t]||e.default||e:void 0}const lc=2e4;function $h(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t=lc?1/0:t}function vj(e,t=100,n){const s=n({...e,keyframes:[0,t]}),o=Math.min($h(s),lc);return{type:"keyframes",ease:l=>s.next(o*l).value/t,duration:Fn(o)}}function Cc(e){return typeof e=="function"}function Dv(e,t){e.timeline=t,e.onfinish=null}const Wh=e=>Array.isArray(e)&&typeof e[0]=="number",xj={linearEasing:void 0};function wj(e,t){const n=Ah(e);return()=>{var s;return(s=xj[t])!==null&&s!==void 0?s:n()}}const cc=wj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),I1=(e,t,n=10)=>{let s="";const o=Math.max(Math.round(t/n),2);for(let l=0;l`cubic-bezier(${e}, ${t}, ${n}, ${s})`,jf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lo([0,.65,.55,1]),circOut:Lo([.55,0,1,.45]),backIn:Lo([.31,.01,.66,-.59]),backOut:Lo([.33,1.53,.69,.99])};function V1(e,t){if(e)return typeof e=="function"&&cc()?I1(e,t):Wh(e)?Lo(e):Array.isArray(e)?e.map(n=>V1(n,t)||jf.easeOut):jf[e]}const bn={x:!1,y:!1};function U1(){return bn.x||bn.y}function Hh(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;const l=(s=n==null?void 0:n[e])!==null&&s!==void 0?s:o.querySelectorAll(e);return l?Array.from(l):[]}return Array.from(e)}function z1(e,t){const n=Hh(e),s=new AbortController,o={passive:!0,...t,signal:s.signal};return[n,o,()=>s.abort()]}function Lv(e){return t=>{t.pointerType==="touch"||U1()||e(t)}}function bj(e,t,n={}){const[s,o,l]=z1(e,n),c=Lv(d=>{const{target:f}=d,p=t(d);if(typeof p!="function"||!f)return;const y=Lv(v=>{p(v),f.removeEventListener("pointerleave",y)});f.addEventListener("pointerleave",y,o)});return s.forEach(d=>{d.addEventListener("pointerenter",c,o)}),l}const $1=(e,t)=>t?e===t?!0:$1(e,t.parentElement):!1,qh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Sj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ej(e){return Sj.has(e.tagName)||e.tabIndex!==-1}const Mo=new WeakSet;function Mv(e){return t=>{t.key==="Enter"&&e(t)}}function Bd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Cj=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Mv(()=>{if(Mo.has(n))return;Bd(n,"down");const o=Mv(()=>{Bd(n,"up")}),l=()=>Bd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Fv(e){return qh(e)&&!U1()}function kj(e,t,n={}){const[s,o,l]=z1(e,n),c=d=>{const f=d.currentTarget;if(!Fv(d)||Mo.has(f))return;Mo.add(f);const p=t(d),y=(C,A)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",w),!(!Fv(C)||!Mo.has(f))&&(Mo.delete(f),typeof p=="function"&&p(C,{success:A}))},v=C=>{y(C,n.useGlobalTarget||$1(f,C.target))},w=C=>{y(C,!1)};window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",w,o)};return s.forEach(d=>{!Ej(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(n.useGlobalTarget?window:d).addEventListener("pointerdown",c,o),d.addEventListener("focus",p=>Cj(p,o),o)}),l}function Tj(e){return e==="x"||e==="y"?bn[e]?null:(bn[e]=!0,()=>{bn[e]=!1}):bn.x||bn.y?null:(bn.x=bn.y=!0,()=>{bn.x=bn.y=!1})}const W1=new Set(["width","height","top","left","right","bottom",...Fi]);let Jl;function _j(){Jl=void 0}const Bn={now:()=>(Jl===void 0&&Bn.set(vt.isProcessing||EN.useManualTiming?vt.timestamp:performance.now()),Jl),set:e=>{Jl=e,queueMicrotask(_j)}};function Kh(e,t){e.indexOf(t)===-1&&e.push(t)}function kc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Qh{constructor(){this.subscriptions=[]}add(t){return Kh(this.subscriptions,t),()=>kc(this.subscriptions,t)}notify(t,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,s);else for(let l=0;l!isNaN(parseFloat(e)),Uo={current:void 0};class Pj{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,o=!0)=>{const l=Bn.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Aj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Qh);const s=this.events[t].add(n);return t==="change"?()=>{s(),Ue.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Uo.current&&Uo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Iv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Iv);return H1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(e,t){return new Pj(e,t)}function Rj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ai(n))}function Nj(e,t){const n=Ec(e,t);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const c in l){const d=WN(l[c]);Rj(e,c,d)}}function jj(e){return!!(ft(e)&&e.add)}function Of(e,t){const n=e.getValue("willChange");if(jj(n))return n.add(t)}function q1(e){return e.props[S1]}const K1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Oj=1e-7,Dj=12;function Lj(e,t,n,s,o){let l,c,d=0;do c=t+(n-t)/2,l=K1(c,s,o)-e,l>0?n=c:t=c;while(Math.abs(l)>Oj&&++dLj(l,0,1,e,n);return l=>l===0||l===1?l:K1(o(l),t,s)}const Q1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,G1=e=>t=>1-e(1-t),Y1=ga(.33,1.53,.69,.99),Gh=G1(Y1),X1=Q1(Gh),J1=e=>(e*=2)<1?.5*Gh(e):.5*(2-Math.pow(2,-10*(e-1))),Yh=e=>1-Math.sin(Math.acos(e)),Z1=G1(Yh),eb=Q1(Yh),tb=e=>/^0[^.\s]+$/u.test(e);function Mj(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tb(e):!0}const zo=e=>Math.round(e*1e5)/1e5,Xh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fj(e){return e==null}const Ij=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Jh=(e,t)=>n=>!!(typeof n=="string"&&Ij.test(n)&&n.startsWith(e)||t&&!Fj(n)&&Object.prototype.hasOwnProperty.call(n,t)),nb=(e,t,n)=>s=>{if(typeof s!="string")return s;const[o,l,c,d]=s.match(Xh);return{[e]:parseFloat(o),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},Bj=e=>rr(0,255,e),Vd={...Ii,transform:e=>Math.round(Bj(e))},fs={test:Jh("rgb","red"),parse:nb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Vd.transform(e)+", "+Vd.transform(t)+", "+Vd.transform(n)+", "+zo(Zo.transform(s))+")"};function Vj(e){let t="",n="",s="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,s+=s,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const Df={test:Jh("#"),parse:Vj,transform:fs.transform},ci={test:Jh("hsl","hue"),parse:nb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+In.transform(zo(t))+", "+In.transform(zo(n))+", "+zo(Zo.transform(s))+")"},_t={test:e=>fs.test(e)||Df.test(e)||ci.test(e),parse:e=>fs.test(e)?fs.parse(e):ci.test(e)?ci.parse(e):Df.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fs.transform(e):ci.transform(e)},Uj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zj(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xh))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Uj))===null||n===void 0?void 0:n.length)||0)>0}const rb="number",sb="color",$j="var",Wj="var(",Bv="${}",Hj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ea(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const d=t.replace(Hj,f=>(_t.test(f)?(s.color.push(l),o.push(sb),n.push(_t.parse(f))):f.startsWith(Wj)?(s.var.push(l),o.push($j),n.push(f)):(s.number.push(l),o.push(rb),n.push(parseFloat(f))),++l,Bv)).split(Bv);return{values:n,split:d,indexes:s,types:o}}function ib(e){return ea(e).values}function ob(e){const{split:t,types:n}=ea(e),s=t.length;return o=>{let l="";for(let c=0;ctypeof e=="number"?0:e;function Kj(e){const t=ib(e);return ob(e)(t.map(qj))}const zr={test:zj,parse:ib,createTransformer:ob,getAnimatableNone:Kj},Qj=new Set(["brightness","contrast","saturate","opacity"]);function Gj(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Xh)||[];if(!s)return e;const o=n.replace(s,"");let l=Qj.has(t)?1:0;return s!==n&&(l*=100),t+"("+l+o+")"}const Yj=/\b([a-z-]*)\(.*?\)/gu,Lf={...zr,getAnimatableNone:e=>{const t=e.match(Yj);return t?t.map(Gj).join(" "):e}},Xj={...Mh,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Lf,WebkitFilter:Lf},Zh=e=>Xj[e];function ab(e,t){let n=Zh(e);return n!==Lf&&(n=zr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Jj=new Set(["auto","none","0"]);function Zj(e,t,n){let s=0,o;for(;se===Ii||e===we,Uv=(e,t)=>parseFloat(e.split(", ")[t]),zv=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/u);if(o)return Uv(o[1],t);{const l=s.match(/^matrix\((.+)\)$/u);return l?Uv(l[1],e):0}},eO=new Set(["x","y","z"]),tO=Fi.filter(e=>!eO.has(e));function nO(e){const t=[];return tO.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Pi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:zv(4,13),y:zv(5,14)};Pi.translateX=Pi.x;Pi.translateY=Pi.y;const Cs=new Set;let Mf=!1,Ff=!1;function lb(){if(Ff){const e=Array.from(Cs).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const o=nO(s);o.length&&(n.set(s,o),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,c])=>{var d;(d=s.getValue(l))===null||d===void 0||d.set(c)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ff=!1,Mf=!1,Cs.forEach(e=>e.complete()),Cs.clear()}function cb(){Cs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ff=!0)})}function rO(){cb(),lb()}class ep{constructor(t,n,s,o,l,c=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Cs.add(this),Mf||(Mf=!0,Ue.read(cb),Ue.resolveKeyframes(lb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:o}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),sO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iO(e){const t=sO.exec(e);if(!t)return[,];const[,n,s,o]=t;return[`--${n??s}`,o]}function db(e,t,n=1){const[s,o]=iO(e);if(!s)return;const l=window.getComputedStyle(t).getPropertyValue(s);if(l){const c=l.trim();return ub(c)?parseFloat(c):c}return Lh(o)?db(o,t,n+1):o}const fb=e=>t=>t.test(e),oO={test:e=>e==="auto",parse:e=>e},hb=[Ii,we,In,Pr,YN,GN,oO],$v=e=>hb.find(fb(e));class pb extends ep{constructor(t,n,s,o,l){super(t,n,s,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const Wv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zr.test(e)||e==="0")&&!e.startsWith("url("));function aO(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Tc(e,{repeat:t,repeatType:n="loop"},s){const o=e.filter(cO),l=t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const uO=40;class mb{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Bn.now(),this.options={autoplay:t,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:c,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>uO?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&rO(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Bn.now(),this.hasAttemptedResolve=!0;const{name:s,type:o,velocity:l,delay:c,onComplete:d,onUpdate:f,isGenerator:p}=this.options;if(!p&&!lO(t,s,o,l))if(c)this.options.duration=0;else{f&&f(Tc(t,this.options,n)),d&&d(),this.resolveFinishedPromise();return}const y=this.initPlayback(t,n);y!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...y},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const He=(e,t,n)=>e+(t-e)*n;function Ud(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dO({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let o=0,l=0,c=0;if(!t)o=l=c=n;else{const d=n<.5?n*(1+t):n+t-n*t,f=2*n-d;o=Ud(f,d,e+1/3),l=Ud(f,d,e),c=Ud(f,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:s}}function uc(e,t){return n=>n>0?t:e}const zd=(e,t,n)=>{const s=e*e,o=n*(t*t-s)+s;return o<0?0:Math.sqrt(o)},fO=[Df,fs,ci],hO=e=>fO.find(t=>t.test(e));function Hv(e){const t=hO(e);if(!t)return!1;let n=t.parse(e);return t===ci&&(n=dO(n)),n}const qv=(e,t)=>{const n=Hv(e),s=Hv(t);if(!n||!s)return uc(e,t);const o={...n};return l=>(o.red=zd(n.red,s.red,l),o.green=zd(n.green,s.green,l),o.blue=zd(n.blue,s.blue,l),o.alpha=He(n.alpha,s.alpha,l),fs.transform(o))},pO=(e,t)=>n=>t(e(n)),ya=(...e)=>e.reduce(pO),If=new Set(["none","hidden"]);function mO(e,t){return If.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gO(e,t){return n=>He(e,t,n)}function tp(e){return typeof e=="number"?gO:typeof e=="string"?Lh(e)?uc:_t.test(e)?qv:xO:Array.isArray(e)?gb:typeof e=="object"?_t.test(e)?qv:yO:uc}function gb(e,t){const n=[...e],s=n.length,o=e.map((l,c)=>tp(l)(l,t[c]));return l=>{for(let c=0;c{for(const l in s)n[l]=s[l](o);return n}}function vO(e,t){var n;const s=[],o={color:0,var:0,number:0};for(let l=0;l{const n=zr.createTransformer(t),s=ea(e),o=ea(t);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?If.has(e)&&!o.values.length||If.has(t)&&!s.values.length?mO(e,t):ya(gb(vO(s,o),o.values),n):uc(e,t)};function yb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?He(e,t,n):tp(e)(e,t)}const wO=5;function vb(e,t,n){const s=Math.max(t-wO,0);return H1(n-e(s),t-s)}const Xe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$d=.001;function bO({duration:e=Xe.duration,bounce:t=Xe.bounce,velocity:n=Xe.velocity,mass:s=Xe.mass}){let o,l,c=1-t;c=rr(Xe.minDamping,Xe.maxDamping,c),e=rr(Xe.minDuration,Xe.maxDuration,Fn(e)),c<1?(o=p=>{const y=p*c,v=y*e,w=y-n,C=Bf(p,c),A=Math.exp(-v);return $d-w/C*A},l=p=>{const v=p*c*e,w=v*n+n,C=Math.pow(c,2)*Math.pow(p,2)*e,A=Math.exp(-v),E=Bf(Math.pow(p,2),c);return(-o(p)+$d>0?-1:1)*((w-C)*A)/E}):(o=p=>{const y=Math.exp(-p*e),v=(p-n)*e+1;return-$d+y*v},l=p=>{const y=Math.exp(-p*e),v=(n-p)*(e*e);return y*v});const d=5/e,f=EO(o,l,d);if(e=Mn(e),isNaN(f))return{stiffness:Xe.stiffness,damping:Xe.damping,duration:e};{const p=Math.pow(f,2)*s;return{stiffness:p,damping:c*2*Math.sqrt(s*p),duration:e}}}const SO=12;function EO(e,t,n){let s=n;for(let o=1;oe[n]!==void 0)}function TO(e){let t={velocity:Xe.velocity,stiffness:Xe.stiffness,damping:Xe.damping,mass:Xe.mass,isResolvedFromDuration:!1,...e};if(!Kv(e,kO)&&Kv(e,CO))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*rr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Xe.mass,stiffness:o,damping:l}}else{const n=bO(e);t={...t,...n,mass:Xe.mass},t.isResolvedFromDuration=!0}return t}function np(e=Xe.visualDuration,t=Xe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:p,mass:y,duration:v,velocity:w,isResolvedFromDuration:C}=TO({...n,velocity:-Fn(n.velocity||0)}),A=w||0,E=p/(2*Math.sqrt(f*y)),b=c-l,S=Fn(Math.sqrt(f/y)),P=Math.abs(b)<5;s||(s=P?Xe.restSpeed.granular:Xe.restSpeed.default),o||(o=P?Xe.restDelta.granular:Xe.restDelta.default);let T;if(E<1){const F=Bf(S,E);T=U=>{const H=Math.exp(-E*S*U);return c-H*((A+E*S*b)/F*Math.sin(F*U)+b*Math.cos(F*U))}}else if(E===1)T=F=>c-Math.exp(-S*F)*(b+(A+S*b)*F);else{const F=S*Math.sqrt(E*E-1);T=U=>{const H=Math.exp(-E*S*U),I=Math.min(F*U,300);return c-H*((A+E*S*b)*Math.sinh(I)+F*b*Math.cosh(I))/F}}const R={calculatedDuration:C&&v||null,next:F=>{const U=T(F);if(C)d.done=F>=v;else{let H=0;E<1&&(H=F===0?Mn(A):vb(T,F,U));const I=Math.abs(H)<=s,G=Math.abs(c-U)<=o;d.done=I&&G}return d.value=d.done?c:U,d},toString:()=>{const F=Math.min($h(R),lc),U=I1(H=>R.next(F*H).value,F,30);return F+"ms "+U}};return R}function Qv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:d,max:f,restDelta:p=.5,restSpeed:y}){const v=e[0],w={done:!1,value:v},C=I=>d!==void 0&&If,A=I=>d===void 0?f:f===void 0||Math.abs(d-I)-E*Math.exp(-I/s),T=I=>S+P(I),R=I=>{const G=P(I),ee=T(I);w.done=Math.abs(G)<=p,w.value=w.done?S:ee};let F,U;const H=I=>{C(w.value)&&(F=I,U=np({keyframes:[w.value,A(w.value)],velocity:vb(T,I,w.value),damping:o,stiffness:l,restDelta:p,restSpeed:y}))};return H(0),{calculatedDuration:null,next:I=>{let G=!1;return!U&&F===void 0&&(G=!0,R(I),H(I)),F!==void 0&&I>=F?U.next(I-F):(!G&&R(I),w)}}}const _O=ga(.42,0,1,1),AO=ga(0,0,.58,1),xb=ga(.42,0,.58,1),wb=e=>Array.isArray(e)&&typeof e[0]!="number",PO={linear:Kt,easeIn:_O,easeInOut:xb,easeOut:AO,circIn:Yh,circInOut:eb,circOut:Z1,backIn:Gh,backInOut:X1,backOut:Y1,anticipate:J1},Gv=e=>{if(Wh(e)){y1(e.length===4);const[t,n,s,o]=e;return ga(t,n,s,o)}else if(typeof e=="string")return PO[e];return e};function RO(e,t,n){const s=[],o=n||yb,l=e.length-1;for(let c=0;ct[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=RO(t,s,o),f=d.length,p=y=>{if(c&&y1)for(;vp(rr(e[0],e[l-1],y)):p}function Sb(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const o=Rs(0,t,s);e.push(He(n,1,o))}}function Eb(e){const t=[0];return Sb(t,e.length-1),t}function NO(e,t){return e.map(n=>n*t)}function jO(e,t){return e.map(()=>t||xb).splice(0,e.length-1)}function dc({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const o=wb(s)?s.map(Gv):Gv(s),l={done:!1,value:t[0]},c=NO(n&&n.length===t.length?n:Eb(t),e),d=bb(c,t,{ease:Array.isArray(o)?o:jO(t,o)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const OO=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>nr(t),now:()=>vt.isProcessing?vt.timestamp:Bn.now()}},DO={decay:Qv,inertia:Qv,tween:dc,keyframes:dc,spring:np},LO=e=>e/100;class rp extends mb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:f}=this.options;f&&f()};const{name:n,motionValue:s,element:o,keyframes:l}=this.options,c=(o==null?void 0:o.KeyframeResolver)||ep,d=(f,p)=>this.onKeyframesResolved(f,p);this.resolver=new c(l,d,n,s,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=this.options,d=Cc(n)?n:DO[n]||dc;let f,p;d!==dc&&typeof t[0]!="number"&&(f=ya(LO,yb(t[0],t[1])),t=[0,100]);const y=d({...this.options,keyframes:t});l==="mirror"&&(p=d({...this.options,keyframes:[...t].reverse(),velocity:-c})),y.calculatedDuration===null&&(y.calculatedDuration=$h(y));const{calculatedDuration:v}=y,w=v+o,C=w*(s+1)-o;return{generator:y,mirroredGenerator:p,mapPercentToKeyframes:f,calculatedDuration:v,resolvedDuration:w,totalDuration:C}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:l,mirroredGenerator:c,mapPercentToKeyframes:d,keyframes:f,calculatedDuration:p,totalDuration:y,resolvedDuration:v}=s;if(this.startTime===null)return l.next(0);const{delay:w,repeat:C,repeatType:A,repeatDelay:E,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-y/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const S=this.currentTime-w*(this.speed>=0?1:-1),P=this.speed>=0?S<0:S>y;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let T=this.currentTime,R=l;if(C){const I=Math.min(this.currentTime,y)/v;let G=Math.floor(I),ee=I%1;!ee&&I>=1&&(ee=1),ee===1&&G--,G=Math.min(G,C+1),!!(G%2)&&(A==="reverse"?(ee=1-ee,E&&(ee-=E/v)):A==="mirror"&&(R=c)),T=rr(0,1,ee)*v}const F=P?{done:!1,value:f[0]}:R.next(T);d&&(F.value=d(F.value));let{done:U}=F;!P&&p!==null&&(U=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&U);return H&&o!==void 0&&(F.value=Tc(f,this.options,o)),b&&b(F.value),H&&this.finish(),F}get duration(){const{resolved:t}=this;return t?Fn(t.calculatedDuration):0}get time(){return Fn(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Fn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=OO,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const MO=new Set(["opacity","clipPath","filter","transform"]);function FO(e,t,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:d="easeInOut",times:f}={}){const p={[t]:n};f&&(p.offset=f);const y=V1(d,o);return Array.isArray(y)&&(p.easing=y),e.animate(p,{delay:s,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"})}const IO=Ah(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fc=10,BO=2e4;function VO(e){return Cc(e.type)||e.type==="spring"||!B1(e.ease)}function UO(e,t){const n=new rp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const o=[];let l=0;for(;!s.done&&lthis.onKeyframesResolved(c,d),n,s,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:o,ease:l,type:c,motionValue:d,name:f,startTime:p}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&cc()&&zO(l)&&(l=Cb[l]),VO(this.options)){const{onComplete:v,onUpdate:w,motionValue:C,element:A,...E}=this.options,b=UO(t,E);t=b.keyframes,t.length===1&&(t[1]=t[0]),s=b.duration,o=b.times,l=b.ease,c="keyframes"}const y=FO(d.owner.current,f,t,{...this.options,duration:s,times:o,ease:l});return y.startTime=p??this.calcStartTime(),this.pendingTimeline?(Dv(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:v}=this.options;d.set(Tc(t,this.options,n)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:s,times:o,type:c,ease:l,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Fn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Fn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Kt;const{animation:s}=n;Dv(s,t)}return Kt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:o,type:l,ease:c,times:d}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:y,onComplete:v,element:w,...C}=this.options,A=new rp({...C,keyframes:s,duration:o,type:l,ease:c,times:d,isGenerator:!0}),E=Mn(this.time);p.setWithVelocity(A.sample(E-fc).value,A.sample(E).value,fc)}const{onStop:f}=this.options;f&&f(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:o,repeatType:l,damping:c,type:d}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=n.owner.getProps();return IO()&&s&&MO.has(s)&&!f&&!p&&!o&&l!=="mirror"&&c!==0&&d!=="inertia"}}const $O={type:"spring",stiffness:500,damping:25,restSpeed:10},WO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HO={type:"keyframes",duration:.8},qO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KO=(e,{keyframes:t})=>t.length>2?HO:Ds.has(e)?e.startsWith("scale")?WO(t[1]):$O:qO;function QO({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:c,repeatDelay:d,from:f,elapsed:p,...y}){return!!Object.keys(y).length}const sp=(e,t,n,s={},o,l)=>c=>{const d=zh(s,e)||{},f=d.delay||s.delay||0;let{elapsed:p=0}=s;p=p-Mn(f);let y={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-p,onUpdate:w=>{t.set(w),d.onUpdate&&d.onUpdate(w)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:o};QO(d)||(y={...y,...KO(e,y)}),y.duration&&(y.duration=Mn(y.duration)),y.repeatDelay&&(y.repeatDelay=Mn(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(v=!0)),v&&!l&&t.get()!==void 0){const w=Tc(y.keyframes,d);if(w!==void 0)return Ue.update(()=>{y.onUpdate(w),y.onComplete()}),new F1([])}return!l&&Yv.supports(y)?new Yv(y):new rp(y)};function GO({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function ip(e,t,{delay:n=0,transitionOverride:s,type:o}={}){var l;let{transition:c=e.getDefaultTransition(),transitionEnd:d,...f}=t;s&&(c=s);const p=[],y=o&&e.animationState&&e.animationState.getState()[o];for(const v in f){const w=e.getValue(v,(l=e.latestValues[v])!==null&&l!==void 0?l:null),C=f[v];if(C===void 0||y&&GO(y,v))continue;const A={delay:n,...zh(c||{},v)};let E=!1;if(window.MotionHandoffAnimation){const S=q1(e);if(S){const P=window.MotionHandoffAnimation(S,v,Ue);P!==null&&(A.startTime=P,E=!0)}}Of(e,v),w.start(sp(v,w,C,e.shouldReduceMotion&&W1.has(v)?{type:!1}:A,e,E));const b=w.animation;b&&p.push(b)}return d&&Promise.all(p).then(()=>{Ue.update(()=>{d&&Nj(e,d)})}),p}function Vf(e,t,n={}){var s;const o=Ec(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:l=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(l=n.transitionOverride);const c=o?()=>Promise.all(ip(e,o,n)):()=>Promise.resolve(),d=e.variantChildren&&e.variantChildren.size?(p=0)=>{const{delayChildren:y=0,staggerChildren:v,staggerDirection:w}=l;return YO(e,t,y+p,v,w,n)}:()=>Promise.resolve(),{when:f}=l;if(f){const[p,y]=f==="beforeChildren"?[c,d]:[d,c];return p().then(()=>y())}else return Promise.all([c(),d(n.delay)])}function YO(e,t,n=0,s=0,o=1,l){const c=[],d=(e.variantChildren.size-1)*s,f=o===1?(p=0)=>p*s:(p=0)=>d-p*s;return Array.from(e.variantChildren).sort(XO).forEach((p,y)=>{p.notify("AnimationStart",t),c.push(Vf(p,t,{...l,delay:n+f(y)}).then(()=>p.notify("AnimationComplete",t)))}),Promise.all(c)}function XO(e,t){return e.sortNodePosition(t)}function JO(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const o=t.map(l=>Vf(e,l,n));s=Promise.all(o)}else if(typeof t=="string")s=Vf(e,t,n);else{const o=typeof t=="function"?Ec(e,t,n.custom):t;s=Promise.all(ip(e,o,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const ZO=Rh.length;function kb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?kb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:s})=>JO(e,n,s)))}function rD(e){let t=nD(e),n=Xv(),s=!0;const o=f=>(p,y)=>{var v;const w=Ec(e,y,f==="exit"?(v=e.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(w){const{transition:C,transitionEnd:A,...E}=w;p={...p,...E,...A}}return p};function l(f){t=f(e)}function c(f){const{props:p}=e,y=kb(e.parent)||{},v=[],w=new Set;let C={},A=1/0;for(let b=0;bA&&R,G=!1;const ee=Array.isArray(T)?T:[T];let de=ee.reduce(o(S),{});F===!1&&(de={});const{prevResolvedValues:Te={}}=P,xe={...Te,...de},Z=ie=>{I=!0,w.has(ie)&&(G=!0,w.delete(ie)),P.needsAnimating[ie]=!0;const W=e.getValue(ie);W&&(W.liveStyle=!1)};for(const ie in xe){const W=de[ie],ne=Te[ie];if(C.hasOwnProperty(ie))continue;let z=!1;Nf(W)&&Nf(ne)?z=!M1(W,ne):z=W!==ne,z?W!=null?Z(ie):w.add(ie):W!==void 0&&w.has(ie)?Z(ie):P.protectedKeys[ie]=!0}P.prevProp=T,P.prevResolvedValues=de,P.isActive&&(C={...C,...de}),s&&e.blockInitialAnimation&&(I=!1),I&&(!(U&&H)||G)&&v.push(...ee.map(ie=>({animation:ie,options:{type:S}})))}if(w.size){const b={};w.forEach(S=>{const P=e.getBaseTarget(S),T=e.getValue(S);T&&(T.liveStyle=!0),b[S]=P??null}),v.push({animation:b})}let E=!!v.length;return s&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(E=!1),s=!1,E?t(v):Promise.resolve()}function d(f,p){var y;if(n[f].isActive===p)return Promise.resolve();(y=e.variantChildren)===null||y===void 0||y.forEach(w=>{var C;return(C=w.animationState)===null||C===void 0?void 0:C.setActive(f,p)}),n[f].isActive=p;const v=c(f);for(const w in n)n[w].protectedKeys={};return v}return{animateChanges:c,setActive:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=Xv(),s=!0}}}function sD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!M1(t,e):!1}function os(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xv(){return{animate:os(!0),whileInView:os(),whileHover:os(),whileTap:os(),whileDrag:os(),whileFocus:os(),exit:os()}}class Wr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iD extends Wr{constructor(t){super(t),t.animationState||(t.animationState=rD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let oD=0;class aD extends Wr{constructor(){super(...arguments),this.id=oD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const lD={animation:{Feature:iD},exit:{Feature:aD}};function ta(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function va(e){return{point:{x:e.pageX,y:e.pageY}}}const cD=e=>t=>qh(t)&&e(t,va(t));function $o(e,t,n,s){return ta(e,t,cD(n),s)}const Jv=(e,t)=>Math.abs(e-t);function uD(e,t){const n=Jv(e.x,t.x),s=Jv(e.y,t.y);return Math.sqrt(n**2+s**2)}class Tb{constructor(t,n,{transformPagePoint:s,contextWindow:o,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Hd(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,C=uD(v.offset,{x:0,y:0})>=3;if(!w&&!C)return;const{point:A}=v,{timestamp:E}=vt;this.history.push({...A,timestamp:E});const{onStart:b,onMove:S}=this.handlers;w||(b&&b(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Wd(w,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:C,onSessionEnd:A,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Hd(v.type==="pointercancel"?this.lastMoveEventInfo:Wd(w,this.transformPagePoint),this.history);this.startEvent&&C&&C(v,b),A&&A(v,b)},!qh(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.contextWindow=o||window;const c=va(t),d=Wd(c,this.transformPagePoint),{point:f}=d,{timestamp:p}=vt;this.history=[{...f,timestamp:p}];const{onSessionStart:y}=n;y&&y(t,Hd(d,this.history)),this.removeListeners=ya($o(this.contextWindow,"pointermove",this.handlePointerMove),$o(this.contextWindow,"pointerup",this.handlePointerUp),$o(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),nr(this.updatePoint)}}function Wd(e,t){return t?{point:t(e.point)}:e}function Zv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Hd({point:e},t){return{point:e,delta:Zv(e,_b(t)),offset:Zv(e,dD(t)),velocity:fD(t,.1)}}function dD(e){return e[0]}function _b(e){return e[e.length-1]}function fD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const o=_b(e);for(;n>=0&&(s=e[n],!(o.timestamp-s.timestamp>Mn(t)));)n--;if(!s)return{x:0,y:0};const l=Fn(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}const Ab=1e-4,hD=1-Ab,pD=1+Ab,Pb=.01,mD=0-Pb,gD=0+Pb;function Qt(e){return e.max-e.min}function yD(e,t,n){return Math.abs(e-t)<=n}function e0(e,t,n,s=.5){e.origin=s,e.originPoint=He(t.min,t.max,e.origin),e.scale=Qt(n)/Qt(t),e.translate=He(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hD&&e.scale<=pD||isNaN(e.scale))&&(e.scale=1),(e.translate>=mD&&e.translate<=gD||isNaN(e.translate))&&(e.translate=0)}function Wo(e,t,n,s){e0(e.x,t.x,n.x,s?s.originX:void 0),e0(e.y,t.y,n.y,s?s.originY:void 0)}function t0(e,t,n){e.min=n.min+t.min,e.max=e.min+Qt(t)}function vD(e,t,n){t0(e.x,t.x,n.x),t0(e.y,t.y,n.y)}function n0(e,t,n){e.min=t.min-n.min,e.max=e.min+Qt(t)}function Ho(e,t,n){n0(e.x,t.x,n.x),n0(e.y,t.y,n.y)}function xD(e,{min:t,max:n},s){return t!==void 0&&en&&(e=s?He(n,e,s.max):Math.min(e,n)),e}function r0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function wD(e,{top:t,left:n,bottom:s,right:o}){return{x:r0(e.x,n,o),y:r0(e.y,t,s)}}function s0(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.mins?n=Rs(t.min,t.max-s,e.min):s>o&&(n=Rs(e.min,e.max-o,t.min)),rr(0,1,n)}function ED(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Uf=.35;function CD(e=Uf){return e===!1?e=0:e===!0&&(e=Uf),{x:i0(e,"left","right"),y:i0(e,"top","bottom")}}function i0(e,t,n){return{min:o0(e,t),max:o0(e,n)}}function o0(e,t){return typeof e=="number"?e:e[t]||0}const a0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ui=()=>({x:a0(),y:a0()}),l0=()=>({min:0,max:0}),Ye=()=>({x:l0(),y:l0()});function on(e){return[e("x"),e("y")]}function Rb({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function kD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function qd(e){return e===void 0||e===1}function zf({scale:e,scaleX:t,scaleY:n}){return!qd(e)||!qd(t)||!qd(n)}function ls(e){return zf(e)||Nb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Nb(e){return c0(e.x)||c0(e.y)}function c0(e){return e&&e!=="0%"}function hc(e,t,n){const s=e-n,o=t*s;return n+o}function u0(e,t,n,s,o){return o!==void 0&&(e=hc(e,o,s)),hc(e,n,s)+t}function $f(e,t=0,n=1,s,o){e.min=u0(e.min,t,n,s,o),e.max=u0(e.max,t,n,s,o)}function jb(e,{x:t,y:n}){$f(e.x,t.translate,t.scale,t.originPoint),$f(e.y,n.translate,n.scale,n.originPoint)}const d0=.999999999999,f0=1.0000000000001;function _D(e,t,n,s=!1){const o=n.length;if(!o)return;t.x=t.y=1;let l,c;for(let d=0;dd0&&(t.x=1),t.yd0&&(t.y=1)}function di(e,t){e.min=e.min+t,e.max=e.max+t}function h0(e,t,n,s,o=.5){const l=He(e.min,e.max,o);$f(e,t,n,l,s)}function fi(e,t){h0(e.x,t.x,t.scaleX,t.scale,t.originX),h0(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ob(e,t){return Rb(TD(e.getBoundingClientRect(),t))}function AD(e,t,n){const s=Ob(e,n),{scroll:o}=t;return o&&(di(s.x,o.offset.x),di(s.y,o.offset.y)),s}const Db=({current:e})=>e?e.ownerDocument.defaultView:null,PD=new WeakMap;class RD{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ye(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(va(y).point)},l=(y,v)=>{const{drag:w,dragPropagation:C,onDragStart:A}=this.getProps();if(w&&!C&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Tj(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(b=>{let S=this.getAxisMotionValue(b).get()||0;if(In.test(S)){const{projection:P}=this.visualElement;if(P&&P.layout){const T=P.layout.layoutBox[b];T&&(S=Qt(T)*(parseFloat(S)/100))}}this.originPoint[b]=S}),A&&Ue.postRender(()=>A(y,v)),Of(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},c=(y,v)=>{const{dragPropagation:w,dragDirectionLock:C,onDirectionLock:A,onDrag:E}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:b}=v;if(C&&this.currentDirection===null){this.currentDirection=ND(b),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",v.point,b),this.updateAxis("y",v.point,b),this.visualElement.render(),E&&E(y,v)},d=(y,v)=>this.stop(y,v),f=()=>on(y=>{var v;return this.getAnimationState(y)==="paused"&&((v=this.getAxisMotionValue(y).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Tb(t,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:Db(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Ue.postRender(()=>l(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:o}=this.getProps();if(!s||!Ul(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(c=xD(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,l=this.constraints;n&&li(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=wD(o.layoutBox,n):this.constraints=!1,this.elastic=CD(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&on(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=ED(o.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!li(t))return!1;const s=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=AD(s,o.root,this.visualElement.getTransformPagePoint());let c=bD(o.layout.layoutBox,l);if(n){const d=n(kD(c));this.hasMutatedConstraints=!!d,d&&(c=Rb(d))}return c}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},p=on(y=>{if(!Ul(y,n,this.currentDirection))return;let v=f&&f[y]||{};c&&(v={min:0,max:0});const w=o?200:1e6,C=o?40:1e7,A={type:"inertia",velocity:s?t[y]:0,bounceStiffness:w,bounceDamping:C,timeConstant:750,restDelta:1,restSpeed:10,...l,...v};return this.startAxisValueAnimation(y,A)});return Promise.all(p).then(d)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Of(this.visualElement,t),s.start(sp(t,s,0,n,this.visualElement,!1))}stopAnimation(){on(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){on(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),o=s[n];return o||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){on(n=>{const{drag:s}=this.getProps();if(!Ul(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:d}=o.layout.layoutBox[n];l.set(t[n]-He(c,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!li(n)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};on(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const f=d.get();o[c]=SD({min:f,max:f},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),on(c=>{if(!Ul(c,t,null))return;const d=this.getAxisMotionValue(c),{min:f,max:p}=this.constraints[c];d.set(He(f,p,o[c]))})}addListeners(){if(!this.visualElement.current)return;PD.set(this.visualElement,this);const t=this.visualElement.current,n=$o(t,"pointerdown",f=>{const{drag:p,dragListener:y=!0}=this.getProps();p&&y&&this.start(f)}),s=()=>{const{dragConstraints:f}=this.getProps();li(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ue.read(s);const c=ta(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(on(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=f[y].translate,v.set(v.get()+f[y].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=Uf,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function Ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ND(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jD extends Wr{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new RD(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}}const p0=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class OD extends Wr{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new Tb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Db(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:p0(t),onStart:p0(n),onMove:s,onEnd:(l,c)=>{delete this.session,o&&Ue.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=$o(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function m0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Po={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=m0(e,t.target.x),s=m0(e,t.target.y);return`${n}% ${s}%`}},DD={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,o=zr.parse(e);if(o.length>5)return s;const l=zr.createTransformer(e),c=typeof o[0]!="number"?1:0,d=n.x.scale*t.x,f=n.y.scale*t.y;o[0+c]/=d,o[1+c]/=f;const p=He(d,f,.5);return typeof o[2+c]=="number"&&(o[2+c]/=p),typeof o[3+c]=="number"&&(o[3+c]/=p),l(o)}};class LD extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=t;oj(MD),l&&(n.group&&n.group.add(l),s&&s.register&&o&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Zl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:o,isPresent:l}=this.props,c=s.projection;return c&&(c.isPresent=l,o||t.layoutDependency!==n||n===void 0?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||Ue.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jh.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Lb(e){const[t,n]=SN(),s=k.useContext(m1);return m.jsx(LD,{...e,layoutGroup:s,switchLayoutGroup:k.useContext(E1),isPresent:t,safeToRemove:n})}const MD={borderRadius:{...Po,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Po,borderTopRightRadius:Po,borderBottomLeftRadius:Po,borderBottomRightRadius:Po,boxShadow:DD};function Mb(e,t,n){const s=ft(e)?e:Ai(e);return s.start(sp("",s,t,n)),s.animation}function Fb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const FD=(e,t)=>e.depth-t.depth;class ID{constructor(){this.children=[],this.isDirty=!1}add(t){Kh(this.children,t),this.isDirty=!0}remove(t){kc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(FD),this.isDirty=!1,this.children.forEach(t)}}function BD(e,t){const n=Bn.now(),s=({timestamp:o})=>{const l=o-n;l>=t&&(nr(s),e(l-t))};return Ue.read(s,!0),()=>nr(s)}const Ib=["TopLeft","TopRight","BottomLeft","BottomRight"],VD=Ib.length,g0=e=>typeof e=="string"?parseFloat(e):e,y0=e=>typeof e=="number"||we.test(e);function UD(e,t,n,s,o,l){o?(e.opacity=He(0,n.opacity!==void 0?n.opacity:1,zD(s)),e.opacityExit=He(t.opacity!==void 0?t.opacity:1,0,$D(s))):l&&(e.opacity=He(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let c=0;cst?1:n(Rs(e,t,s))}function x0(e,t){e.min=t.min,e.max=t.max}function sn(e,t){x0(e.x,t.x),x0(e.y,t.y)}function w0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function b0(e,t,n,s,o){return e-=t,e=hc(e,1/n,s),o!==void 0&&(e=hc(e,1/o,s)),e}function WD(e,t=0,n=1,s=.5,o,l=e,c=e){if(In.test(t)&&(t=parseFloat(t),t=He(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=He(l.min,l.max,s);e===l&&(d-=t),e.min=b0(e.min,t,n,d,o),e.max=b0(e.max,t,n,d,o)}function S0(e,t,[n,s,o],l,c){WD(e,t[n],t[s],t[o],t.scale,l,c)}const HD=["x","scaleX","originX"],qD=["y","scaleY","originY"];function E0(e,t,n,s){S0(e.x,t,HD,n?n.x:void 0,s?s.x:void 0),S0(e.y,t,qD,n?n.y:void 0,s?s.y:void 0)}function C0(e){return e.translate===0&&e.scale===1}function Vb(e){return C0(e.x)&&C0(e.y)}function k0(e,t){return e.min===t.min&&e.max===t.max}function KD(e,t){return k0(e.x,t.x)&&k0(e.y,t.y)}function T0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ub(e,t){return T0(e.x,t.x)&&T0(e.y,t.y)}function _0(e){return Qt(e.x)/Qt(e.y)}function A0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class QD{constructor(){this.members=[]}add(t){Kh(this.members,t),t.scheduleRender()}remove(t){if(kc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GD(e,t,n){let s="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||l||c)&&(s=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:p,rotate:y,rotateX:v,rotateY:w,skewX:C,skewY:A}=n;p&&(s=`perspective(${p}px) ${s}`),y&&(s+=`rotate(${y}deg) `),v&&(s+=`rotateX(${v}deg) `),w&&(s+=`rotateY(${w}deg) `),C&&(s+=`skewX(${C}deg) `),A&&(s+=`skewY(${A}deg) `)}const d=e.x.scale*t.x,f=e.y.scale*t.y;return(d!==1||f!==1)&&(s+=`scale(${d}, ${f})`),s||"none"}const cs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Fo=typeof window<"u"&&window.MotionDebug!==void 0,Kd=["","X","Y","Z"],YD={visibility:"hidden"},P0=1e3;let XD=0;function Qd(e,t,n,s){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),s&&(s[e]=0))}function zb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=q1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ue,!(o||l))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&zb(s)}function $b({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(c={},d=t==null?void 0:t()){this.id=XD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Fo&&(cs.totalNodes=cs.resolvedTargetDeltas=cs.recalculatedProjection=0),this.nodes.forEach(eL),this.nodes.forEach(iL),this.nodes.forEach(oL),this.nodes.forEach(tL),Fo&&window.MotionDebug.record(cs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;fthis.root.updateBlockedByResize=!1;e(c,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=BD(w,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEach(N0))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&y&&(f||p)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:w,hasRelativeTargetChanged:C,layout:A})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||y.getDefaultTransition()||dL,{onLayoutAnimationStart:b,onLayoutAnimationComplete:S}=y.getProps(),P=!this.targetLayout||!Ub(this.targetLayout,A)||C,T=!w&&C;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||w&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,T);const R={...zh(E,"layout"),onPlay:b,onComplete:S};(y.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R)}else w||N0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=A})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,nr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(aL),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f{const F=R/1e3;j0(v.x,c.x,F),j0(v.y,c.y,F),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ho(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cL(this.relativeTarget,this.relativeTargetOrigin,w,F),T&&KD(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ye()),sn(T,this.relativeTarget)),E&&(this.animationValues=y,UD(y,p,this.latestValues,F,P,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(nr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{Zl.hasAnimatedSinceResize=!0,this.currentAnimation=Mb(0,P0,{...c,onUpdate:d=>{this.mixTargetDelta(d),c.onUpdate&&c.onUpdate(d)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(P0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:f,layout:p,latestValues:y}=c;if(!(!d||!f||!p)){if(this!==c&&this.layout&&p&&Wb(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||Ye();const v=Qt(this.layout.layoutBox.x);f.x.min=c.target.x.min,f.x.max=f.x.min+v;const w=Qt(this.layout.layoutBox.y);f.y.min=c.target.y.min,f.y.max=f.y.min+w}sn(d,f),fi(d,y),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,d,y)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new QD),this.sharedNodes.get(c).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var c;const{layoutId:d}=this.options;return d?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:d}=this.options;return d?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:f}=c;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const p={};f.z&&Qd("z",c,p,this.animationValues);for(let y=0;y{var d;return(d=c.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(R0),this.root.sharedNodes.clear()}}}function JD(e){e.updateLayout()}function ZD(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:l}=e.options,c=n.source!==e.layout.source;l==="size"?on(v=>{const w=c?n.measuredBox[v]:n.layoutBox[v],C=Qt(w);w.min=s[v].min,w.max=w.min+C}):Wb(l,n.layoutBox,s)&&on(v=>{const w=c?n.measuredBox[v]:n.layoutBox[v],C=Qt(s[v]);w.max=w.min+C,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+C)});const d=ui();Wo(d,s,n.layoutBox);const f=ui();c?Wo(f,e.applyTransform(o,!0),n.measuredBox):Wo(f,s,n.layoutBox);const p=!Vb(d);let y=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:w,layout:C}=v;if(w&&C){const A=Ye();Ho(A,n.layoutBox,w.layoutBox);const E=Ye();Ho(E,s,C.layoutBox),Ub(A,E)||(y=!0),v.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=A,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:f,layoutDelta:d,hasLayoutChanged:p,hasRelativeTargetChanged:y})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function eL(e){Fo&&cs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function tL(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nL(e){e.clearSnapshot()}function R0(e){e.clearMeasurements()}function rL(e){e.isLayoutDirty=!1}function sL(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function N0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iL(e){e.resolveTargetDelta()}function oL(e){e.calcProjection()}function aL(e){e.resetSkewAndRotation()}function lL(e){e.removeLeadSnapshot()}function j0(e,t,n){e.translate=He(t.translate,0,n),e.scale=He(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function O0(e,t,n,s){e.min=He(t.min,n.min,s),e.max=He(t.max,n.max,s)}function cL(e,t,n,s){O0(e.x,t.x,n.x,s),O0(e.y,t.y,n.y,s)}function uL(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dL={duration:.45,ease:[.4,0,.1,1]},D0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),L0=D0("applewebkit/")&&!D0("chrome/")?Math.round:Kt;function M0(e){e.min=L0(e.min),e.max=L0(e.max)}function fL(e){M0(e.x),M0(e.y)}function Wb(e,t,n){return e==="position"||e==="preserve-aspect"&&!yD(_0(t),_0(n),.2)}function hL(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const pL=$b({attachResizeListener:(e,t)=>ta(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gd={current:void 0},Hb=$b({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gd.current){const e=new pL({});e.mount(window),e.setOptions({layoutScroll:!0}),Gd.current=e}return Gd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mL={pan:{Feature:OD},drag:{Feature:jD,ProjectionNode:Hb,MeasureLayout:Lb}};function F0(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=s[o];l&&Ue.postRender(()=>l(t,va(t)))}class gL extends Wr{mount(){const{current:t}=this.node;t&&(this.unmount=bj(t,n=>(F0(this.node,n,"Start"),s=>F0(this.node,s,"End"))))}unmount(){}}class yL extends Wr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ya(ta(this.node.current,"focus",()=>this.onFocus()),ta(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function I0(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),l=s[o];l&&Ue.postRender(()=>l(t,va(t)))}class vL extends Wr{mount(){const{current:t}=this.node;t&&(this.unmount=kj(t,n=>(I0(this.node,n,"Start"),(s,{success:o})=>I0(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wf=new WeakMap,Yd=new WeakMap,xL=e=>{const t=Wf.get(e.target);t&&t(e)},wL=e=>{e.forEach(xL)};function bL({root:e,...t}){const n=e||document;Yd.has(n)||Yd.set(n,{});const s=Yd.get(n),o=JSON.stringify(t);return s[o]||(s[o]=new IntersectionObserver(wL,{root:e,...t})),s[o]}function SL(e,t,n){const s=bL(t);return Wf.set(e,n),s.observe(e),()=>{Wf.delete(e),s.unobserve(e)}}const EL={some:0,all:1};class CL extends Wr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:o="some",once:l}=t,c={root:n?n.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:EL[o]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),w=p?y:v;w&&w(f)};return SL(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(kL(t,n))&&this.startObserver()}unmount(){}}function kL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const TL={inView:{Feature:CL},tap:{Feature:vL},focus:{Feature:yL},hover:{Feature:gL}},_L={layout:{ProjectionNode:Hb,MeasureLayout:Lb}},Hf={current:null},qb={current:!1};function AL(){if(qb.current=!0,!!_h)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Hf.current=e.matches;e.addListener(t),t()}else Hf.current=!1}const PL=[...hb,_t,zr],RL=e=>PL.find(fb(e)),Ri=new WeakMap;function NL(e,t,n){for(const s in t){const o=t[s],l=n[s];if(ft(o))e.addValue(s,o);else if(ft(l))e.addValue(s,Ai(o,{owner:e}));else if(l!==o)if(e.hasValue(s)){const c=e.getValue(s);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(s);e.addValue(s,Ai(c!==void 0?c:o,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const B0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kb{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:l,visualState:c},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ep,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const C=Bn.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),qb.current||AL(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Hf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ri.delete(this.current),this.projection&&this.projection.unmount(),nr(this.notifyUpdate),nr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Ds.has(t),o=n.on("change",d=>{this.latestValues[t]=d,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),l=n.on("renderRequest",this.scheduleRender);let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),l(),c&&c(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in _i){const n=_i[t];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[t]&&o&&s(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ye()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Ai(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ub(o)||tb(o))?o=parseFloat(o):!RL(o)&&zr.test(n)&&(o=ab(t,n)),this.setBaseTarget(t,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const c=Dh(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);c&&(o=c[t])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,t);return l!==void 0&&!ft(l)?l:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qb extends Kb{constructor(){super(...arguments),this.KeyframeResolver=pb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jL(e){return window.getComputedStyle(e)}class Gb extends Qb{constructor(){super(...arguments),this.type="html",this.renderInstance=R1}readValueFromInstance(t,n){if(Ds.has(n)){const s=Zh(n);return s&&s.default||0}else{const s=jL(t),o=(_1(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ob(t,n)}build(t,n,s){Fh(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Uh(t,n,s)}}class Yb extends Qb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ds.has(n)){const s=Zh(n);return s&&s.default||0}return n=N1.has(n)?n:Nh(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return D1(t,n,s)}build(t,n,s){Ih(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,o){j1(t,n,s,o)}mount(t){this.isSVGTag=Vh(t.tagName),super.mount(t)}}const OL=(e,t)=>Oh(e)?new Yb(t):new Gb(t,{allowProjection:e!==k.Fragment}),DL=mj({...lD,...TL,...mL,..._L},OL),qt=RN(DL);function Xb(e){const t=Ch(()=>Ai(e)),{isStatic:n}=k.useContext(Th);if(n){const[,s]=k.useState(e);k.useEffect(()=>t.on("change",s),[])}return t}function Jb(e,t){const n=Xb(t()),s=()=>n.set(t());return s(),g1(()=>{const o=()=>Ue.preRender(s,!1,!0),l=e.map(c=>c.on("change",o));return()=>{l.forEach(c=>c()),nr(s)}}),n}const LL=e=>e&&typeof e=="object"&&e.mix,ML=e=>LL(e)?e.mix:void 0;function FL(...e){const t=!Array.isArray(e[0]),n=t?0:-1,s=e[0+n],o=e[1+n],l=e[2+n],c=e[3+n],d=bb(o,l,{mixer:ML(l[0]),...c});return t?d(s):d}function IL(e){Uo.current=[],e();const t=Jb(Uo.current,e);return Uo.current=void 0,t}function BL(e,t,n,s){if(typeof e=="function")return IL(e);const o=typeof t=="function"?t:FL(t,n,s);return Array.isArray(e)?V0(e,o):V0([e],([l])=>o(l))}function V0(e,t){const n=Ch(()=>[]);return Jb(e,()=>{n.length=0;const s=e.length;for(let o=0;o{const s=t-e;return((n-e)%s+s)%s+e};function Zb(e,t){return wb(e)?e[VL(0,e.length,t)]:e}function op(e){return typeof e=="object"&&!Array.isArray(e)}function eS(e,t,n,s){return typeof e=="string"&&op(t)?Hh(e,n,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function UL(e,t,n){return e*(t+1)}function U0(e,t,n,s){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=s.get(t))!==null&&o!==void 0?o:e}function zL(e,t,n){for(let s=0;st&&o.at{const G=QL(R),{delay:ee=0,times:de=Eb(G),type:Te="keyframes",repeat:xe,repeatType:Z,repeatDelay:Ae=0,...Ce}=F;let{ease:ie=t.ease||"easeOut",duration:W}=F;const ne=typeof ee=="function"?ee(H,I):ee,z=G.length,O=Cc(Te)?Te:o==null?void 0:o[Te];if(z<=2&&O){let he=100;if(z===2&&XL(G)){const _e=G[1]-G[0];he=Math.abs(_e)}const X={...Ce};W!==void 0&&(X.duration=Mn(W));const be=vj(X,he,O);ie=be.ease,W=be.duration}W??(W=l);const $=v+ne;de.length===1&&de[0]===0&&(de[1]=1);const fe=de.length-G.length;if(fe>0&&Sb(de,fe),G.length===1&&G.unshift(null),xe){W=UL(W,xe);const he=[...G],X=[...de];ie=Array.isArray(ie)?[...ie]:[ie];const be=[...ie];for(let _e=0;_e{for(const E in C){const b=C[E];b.sort(HL);const S=[],P=[],T=[];for(let F=0;Ftypeof e=="number",XL=e=>e.every(YL);function JL(e,t){return e in t}class ZL extends Kb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(JL(n,t)){const s=t[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ye()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function eM(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Fb(e)?new Yb(t):new Gb(t);n.mount(e),Ri.set(e,n)}function tM(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new ZL(t);n.mount(e),Ri.set(e,n)}function nM(e,t){return ft(e)||typeof e=="number"||typeof e=="string"&&!op(t)}function tS(e,t,n,s){const o=[];if(nM(e,t))o.push(Mb(e,op(t)&&t.default||t,n&&(n.default||n)));else{const l=eS(e,t,s),c=l.length;for(let d=0;d{s.push(...tS(d,l,c))}),s}function sM(e){return Array.isArray(e)&&e.some(Array.isArray)}function iM(e){function t(n,s,o){let l=[];return sM(n)?l=rM(n,s,e):l=tS(n,s,o,e),new F1(l)}return t}const oM=iM(),aM={some:0,all:1};function lM(e,t,{root:n,margin:s,amount:o="some"}={}){const l=Hh(e),c=new WeakMap,d=p=>{p.forEach(y=>{const v=c.get(y.target);if(y.isIntersecting!==!!v)if(y.isIntersecting){const w=t(y);typeof w=="function"?c.set(y.target,w):f.unobserve(y.target)}else typeof v=="function"&&(v(y),c.delete(y.target))})},f=new IntersectionObserver(d,{root:n,rootMargin:s,threshold:typeof o=="number"?o:aM[o]});return l.forEach(p=>f.observe(p)),()=>f.disconnect()}function cM(e,{root:t,margin:n,amount:s,once:o=!1}={}){const[l,c]=k.useState(!1);return k.useEffect(()=>{if(!e.current||o&&l)return;const d=()=>(c(!0),o?void 0:()=>c(!1)),f={root:t&&t.current||void 0,margin:n,amount:s};return lM(e.current,d,f)},[t,e,n,o,s]),l}const uM=[.16,1,.3,1];function Se({children:e,delay:t=0,y:n=24,className:s}){return m.jsx(qt.div,{initial:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:uM},className:s,children:e})}function ap({to:e,duration:t=1.6,suffix:n="",prefix:s="",decimals:o=0,className:l}){const c=k.useRef(null),d=cM(c,{once:!0,margin:"-80px"}),f=Xb(0),p=BL(f,y=>{const v=y.toFixed(o),w=o>0?v.replace(/\B(?=(\d{3})+(?!\d))/g,","):Number(v).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return s+w+n});return k.useEffect(()=>{if(d)return oM(f,e,{duration:t,ease:"easeOut"}).stop},[d,e,t]),m.jsx(qt.span,{ref:c,className:l,children:p})}function xa({children:e,color:t="#C9A227",className:n=""}){return m.jsxs("div",{className:`flex items-center gap-4 ${n}`,children:[m.jsx("span",{className:"h-px w-12",style:{backgroundColor:t,opacity:.5}}),m.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-[0.18em]",style:{color:t},children:e})]})}function sr({overline:e,title:t,subtitle:n,accent:s="#C9A227",tone:o="dark",align:l="center"}){const c=o==="dark"?"#F8F6F1":"#0A1628",d=o==="dark"?"#EDE8DF":"#2C3E50";return m.jsxs("div",{className:`flex flex-col ${l==="center"?"items-center text-center":"items-start text-left"} gap-5`,children:[e&&m.jsx(xa,{color:s,children:e}),m.jsx("h2",{className:"font-display font-light leading-[1.05] tracking-[-0.02em] text-[32px] sm:text-[44px] md:text-[52px]",style:{color:c,maxWidth:l==="center"?"820px":"640px"},children:t}),n&&m.jsx("p",{className:"text-[16px] md:text-[17px] leading-[1.75]",style:{color:d,maxWidth:l==="center"?"760px":"620px"},children:n})]})}function nS({children:e,tone:t="gold"}){const n={gold:{bg:"rgba(201,162,39,0.1)",border:"rgba(201,162,39,0.3)",color:"#C9A227"},sage:{bg:"rgba(122,139,110,0.15)",border:"rgba(122,139,110,0.3)",color:"#7A8B6E"},terra:{bg:"rgba(184,115,51,0.12)",border:"rgba(184,115,51,0.3)",color:"#B87333"}},s=n[t]||n.gold;return m.jsx("span",{className:"inline-flex items-center rounded-full px-4 py-1.5 text-[12px] font-semibold uppercase tracking-[0.08em]",style:{backgroundColor:s.bg,border:`1px solid ${s.border}`,color:s.color},children:e})}function rS({children:e,color:t="#C9A227"}){return m.jsxs("li",{className:"flex items-start gap-3.5",children:[m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"mt-0.5 shrink-0",style:{color:t},children:[m.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),m.jsx("path",{d:"M8 12.5l2.5 2.5 5.5-6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),m.jsx("span",{className:"text-[15px] leading-[1.6]",style:{color:"#2C3E50"},children:e})]})}function dM({children:e,color:t="#C9A227"}){return m.jsxs("li",{className:"flex items-start gap-3.5",children:[m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"mt-0.5 shrink-0",style:{color:t},children:[m.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),m.jsx("path",{d:"M8 12.5l2.5 2.5 5.5-6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),m.jsx("span",{className:"text-[15px] leading-[1.6]",style:{color:"#EDE8DF"},children:e})]})}function fM({items:e}){return m.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex flex-wrap items-center gap-2 text-[13px]",style:{color:"#A89F91"},children:[m.jsxs(Bo,{to:"/",className:"flex items-center gap-1.5 transition-colors hover:text-[#C9A227]",children:[m.jsx(N2,{size:13}),m.jsx("span",{children:"Home"})]}),e.map(t=>m.jsxs(ln.Fragment,{children:[m.jsx(C2,{size:13,className:"opacity-40"}),t.to?m.jsx(Bo,{to:t.to,className:"transition-colors hover:text-[#C9A227]",children:t.label}):m.jsx("span",{style:{color:"#D4B896"},children:t.label})]},t.label))]})}function lp(){return m.jsx("div",{className:"relative hidden h-px flex-1 md:block",style:{backgroundColor:"rgba(184,115,51,0.25)"},children:m.jsx("div",{className:"absolute top-1/2 h-1.5 w-1.5 -translate-y-1/2 rounded-full",style:{backgroundColor:"#C9A227",animation:"flow-x 2.4s linear infinite"}})})}const hM="https://media.base44.com/images/public/6a7b00168bc3a29a795c74cd/14197f162_generated_f58a1695.png",pM=[{label:"BIM Maturity",value:2,suffix:"",display:"Level",custom:"Level 2"},{label:"Digital Projects",value:85,suffix:"+"},{label:"Data Points / Day",value:2.4,suffix:"M",decimals:1},{label:"R&D Investment",value:4,suffix:"M/yr",prefix:"QAR "}];function mM({m:e,i:t}){return m.jsxs(qt.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.6+t*.1,duration:.6,ease:[.16,1,.3,1]},className:"flex flex-col",children:[m.jsx("div",{className:"font-display text-[40px] font-light leading-none md:text-[56px]",style:{color:"#C9A227"},children:e.custom?e.custom:m.jsx(ap,{to:e.value,suffix:e.suffix||"",prefix:e.prefix||"",decimals:e.decimals||0})}),m.jsx("div",{className:"mt-3 text-[11px] font-semibold uppercase tracking-[0.14em]",style:{color:"#A89F91"},children:e.label})]})}function gM(){const e=Array.from({length:22});return m.jsxs("section",{className:"relative flex min-h-[720px] items-center overflow-hidden",style:{backgroundColor:"#0A1628"},children:[m.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${hM})`,opacity:.35}}),m.jsx("div",{className:"tech-grid-bg absolute inset-0 opacity-60"}),m.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, #0A1628 0%, rgba(10,22,40,0.6) 50%, transparent 100%)"}}),m.jsx("div",{className:"pointer-events-none absolute inset-0",children:e.map((t,n)=>{const s=n*4.6%100,o=n*7.3%100,l=8+n%5*2;return m.jsx("span",{className:"animate-float-drift absolute h-1 w-1 rounded-full",style:{left:`${s}%`,top:`${o}%`,backgroundColor:"rgba(201,162,39,0.5)",animationDelay:`${n*.4}s`,animationDuration:`${l}s`}},n)})}),m.jsxs("div",{className:"relative z-10 mx-auto w-full max-w-[1400px] px-6 py-32 md:py-40",children:[m.jsx(qt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:m.jsx(fM,{items:[{to:"/our-business",label:"Our Business"},{to:"/our-business/project-management",label:"Project Management"},{label:"Technology"}]})}),m.jsxs(qt.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2,ease:[.16,1,.3,1]},className:"mt-10",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("span",{className:"h-px w-12",style:{backgroundColor:"#C9A227",opacity:.5}}),m.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-[0.18em]",style:{color:"#C9A227"},children:"Technology & Innovation"})]}),m.jsxs("h1",{className:"mt-5 max-w-[780px] font-display text-[44px] font-light leading-[1.0] tracking-[-0.02em] md:text-[80px]",style:{color:"#F8F6F1"},children:["Where Engineering",m.jsx("br",{}),"Meets Intelligence"]})]}),m.jsx(qt.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.4},className:"mt-7 max-w-[680px] text-[16px] leading-[1.8] md:text-[17px]",style:{color:"#EDE8DF"},children:"Alrazah Project Management deploys industry-leading digital technologies across every phase of project delivery. From Building Information Modeling and digital twins to drone reality capture and AI-powered analytics, our technology ecosystem transforms how projects are designed, built, and operated — delivering measurable advantages in cost, schedule, quality, and sustainability."}),m.jsx("div",{className:"mt-14 grid grid-cols-2 gap-8 border-t pt-8 md:grid-cols-4 md:gap-12",style:{borderColor:"rgba(201,162,39,0.15)"},children:pM.map((t,n)=>m.jsx(mM,{m:t,i:n},t.label))}),m.jsxs(qt.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.7,duration:.6},className:"mt-12 flex flex-col gap-4 sm:flex-row",children:[m.jsxs("a",{href:"#downloads",className:"group inline-flex items-center justify-center gap-2.5 rounded-full px-7 py-3.5 text-[14px] font-semibold transition-all hover:scale-[1.02]",style:{backgroundColor:"#C9A227",color:"#0A1628"},children:[m.jsx(F2,{size:16,className:"fill-current"}),"Request a Technology Demo",m.jsx(th,{size:15,className:"transition-transform group-hover:translate-x-1"})]}),m.jsxs("a",{href:"#downloads",className:"inline-flex items-center justify-center gap-2.5 rounded-full px-7 py-3.5 text-[14px] font-semibold transition-all hover:bg-[rgba(201,162,39,0.06)]",style:{border:"1px solid rgba(201,162,39,0.5)",color:"#F8F6F1"},children:[m.jsx(Mx,{size:16}),"Download Technology Overview"]})]})]})]})}const yM=[{dim:"3D",title:"3D Design Coordination",desc:"Integrated architectural, structural, and MEP modeling with real-time clash detection and design optimization.",sw:"Revit 2024, Navisworks, Solibri"},{dim:"4D",title:"4D Construction Sequencing",desc:"Time-integrated BIM linking 3D models to project schedules for visual planning, logistics optimization, and progress simulation.",sw:"Navisworks Timeliner, Synchro"},{dim:"5D",title:"5D Cost Integration",desc:"Quantity extraction linked to cost databases for real-time budget tracking, variation analysis, and cash flow forecasting.",sw:"CostX, Candy, custom APIs"},{dim:"6D",title:"6D Sustainability Analysis",desc:"Energy modeling, carbon footprint calculation, daylight analysis, and LEED/BREEAM compliance verification.",sw:"IES VE, Green Building Studio"},{dim:"7D",title:"7D Asset Management",desc:"COBie data delivery, maintenance scheduling integration, and digital handover for facilities management.",sw:"BIM 360 Ops, custom FM integration"}],W0=[{n:"01",t:"Model Creation",d:"Discipline-specific models in Revit / Civil 3D"},{n:"02",t:"Coordination",d:"Clash detection, design review, issue tracking"},{n:"03",t:"Approval",d:"Client sign-off, regulatory compliance check"},{n:"04",t:"Construction",d:"4D sequencing, field BIM, progress tracking"},{n:"05",t:"Handover",d:"COBie delivery, FM integration, as-built model"}],vM=["ISO 19650-1 & -2 Compliant","BIM Level 2 Certified","buildingSMART International Member","Autodesk AEC Collection","Revit Certified Professionals: 12"];function xM({d:e,i:t}){return m.jsx(Se,{delay:t*.06,className:"h-full",children:m.jsxs(qt.div,{whileHover:{y:-4},transition:{duration:.3},className:"relative h-full overflow-hidden rounded-xl p-8",style:{backgroundColor:"rgba(26,42,66,0.5)",border:"1px solid rgba(201,162,39,0.1)"},children:[m.jsx("span",{className:"absolute right-4 top-3 font-display text-[42px] font-light",style:{color:"rgba(201,162,39,0.15)"},children:e.dim}),m.jsx("div",{className:"mb-4 flex h-9 w-9 items-center justify-center rounded-lg",style:{backgroundColor:"rgba(201,162,39,0.1)"},children:m.jsx("span",{className:"h-3 w-3 rounded-sm",style:{backgroundColor:"#C9A227"}})}),m.jsx("h3",{className:"text-[18px] font-medium",style:{color:"#F8F6F1"},children:e.title}),m.jsx("p",{className:"mt-2 text-[14px] leading-[1.6]",style:{color:"#EDE8DF"},children:e.desc}),m.jsxs("div",{className:"mt-5 border-t pt-4",style:{borderColor:"rgba(201,162,39,0.1)"},children:[m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.14em]",style:{color:"#A89F91"},children:"Software"}),m.jsx("div",{className:"mt-1 text-[13px]",style:{color:"#C9A227"},children:e.sw})]})]})})}function wM(){return m.jsx("section",{className:"relative py-24 md:py-32",style:{backgroundColor:"#0F1D33",borderTop:"1px solid rgba(201,162,39,0.08)"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1200px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"dark",accent:"#C9A227",overline:"Building Information Modeling",title:"BIM Is Not a Tool. It Is Our Operating System.",subtitle:"We maintain BIM Level 2 maturity across all major projects, with selective Level 3 capabilities on our most complex developments. Our BIM ecosystem integrates design coordination, clash detection, 4D construction sequencing, 5D cost integration, 6D sustainability analysis, and 7D facilities management data — creating a single source of truth from concept to operations."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-5",children:yM.map((e,t)=>m.jsx(xM,{d:e,i:t},e.dim))}),m.jsxs("div",{className:"mt-24",children:[m.jsxs(Se,{className:"text-center",children:[m.jsx("h3",{className:"font-display text-[28px] font-normal md:text-[36px]",style:{color:"#F8F6F1"},children:"BIM Execution Workflow"}),m.jsx("p",{className:"mt-3 text-[16px]",style:{color:"#EDE8DF"},children:"From model creation to digital handover"})]}),m.jsx("div",{className:"mt-12 flex flex-col items-stretch gap-4 md:flex-row md:items-center",children:W0.map((e,t)=>m.jsxs(ln.Fragment,{children:[m.jsx(Se,{delay:t*.08,className:"flex-1",children:m.jsxs("div",{className:"rounded-lg p-6 text-center",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.1)"},children:[m.jsx("div",{className:"text-[14px] font-semibold tracking-[0.1em]",style:{color:"#C9A227"},children:e.n}),m.jsx("div",{className:"mt-3 text-[17px] font-semibold",style:{color:"#F8F6F1"},children:e.t}),m.jsx("div",{className:"mt-2 text-[13px] leading-[1.5]",style:{color:"#EDE8DF"},children:e.d})]})}),tm.jsx(nS,{children:e},e))})]})]})})}const bM=["Real-time sensor integration (temperature, humidity, occupancy, energy)","Predictive maintenance algorithms with failure probability scoring","Energy consumption optimization and anomaly detection","Space utilization analytics for commercial assets","Indoor air quality monitoring and HVAC optimization","Structural health monitoring for critical infrastructure","Integration with BMS, EMS, and CMMS platforms"],SM=[{label:"Energy (kWh)",value:"12,450",trend:"↓ 8.2% vs last month",trendColor:"#00D4AA",bars:[40,55,48,62,50,70,58,45]},{label:"Occupancy",value:"87%",trend:"↑ 4% vs yesterday",trendColor:"#C9A227",bars:[50,65,80,72,90,85,87]},{label:"HVAC Efficiency",value:"94.2%",trend:"Optimal",trendColor:"#00D4AA",gauge:94.2},{label:"Maintenance",value:"2",trend:"Scheduled this week",trendColor:"#EDE8DF",alerts:["AHU-04 filter due","Chiller-02 service"]}];function EM({data:e,color:t}){const n=Math.max(...e),s=e.map((o,l)=>`${l/(e.length-1)*100},${30-o/n*28}`).join(" ");return m.jsx("svg",{viewBox:"0 0 100 30",className:"mt-3 h-8 w-full",preserveAspectRatio:"none",children:m.jsx("polyline",{points:s,fill:"none",stroke:t,strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function CM({value:e}){return m.jsxs("svg",{viewBox:"0 0 120 70",className:"mt-3 h-12 w-full",children:[m.jsx("path",{d:"M10 60 A 50 50 0 0 1 110 60",fill:"none",stroke:"rgba(201,162,39,0.15)",strokeWidth:"8",strokeLinecap:"round"}),m.jsx("path",{d:"M10 60 A 50 50 0 0 1 110 60",fill:"none",stroke:"#C9A227",strokeWidth:"8",strokeLinecap:"round",strokeDasharray:"157",strokeDashoffset:157-157*e/100})]})}function kM({w:e}){return m.jsxs("div",{className:"rounded-lg p-4",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:[m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.14em]",style:{color:"#A89F91"},children:e.label}),m.jsx("div",{className:"mt-1 text-[24px] font-normal",style:{color:"#C9A227"},children:e.value}),m.jsx("div",{className:"text-[11px]",style:{color:e.trendColor},children:e.trend}),e.bars&&!e.gauge&&m.jsx(EM,{data:e.bars,color:"#C9A227"}),e.gauge&&m.jsx(CM,{value:e.gauge}),e.alerts&&m.jsx("ul",{className:"mt-3 space-y-1 text-[11px]",style:{color:"#A89F91"},children:e.alerts.map(t=>m.jsxs("li",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"h-1 w-1 rounded-full",style:{backgroundColor:"#B87333"}}),t]},t))})]})}function TM(){return m.jsx("section",{className:"py-24 md:py-32",style:{backgroundColor:"#F8F6F1"},children:m.jsxs("div",{className:"mx-auto grid w-full max-w-[1200px] grid-cols-1 gap-16 px-6 lg:grid-cols-2 lg:items-start",children:[m.jsxs("div",{children:[m.jsx(Se,{children:m.jsx(xa,{color:"#B87333",children:"Digital Twin"})}),m.jsx(Se,{delay:.05,children:m.jsx("h2",{className:"mt-5 max-w-[520px] font-display text-[34px] font-light leading-[1.05] tracking-[-0.02em] md:text-[52px]",style:{color:"#0A1628"},children:"Virtual Replicas. Real Performance. Predictive Intelligence."})}),m.jsx(Se,{delay:.1,children:m.jsxs("div",{className:"mt-6 space-y-4 text-[16px] leading-[1.8]",style:{color:"#2C3E50"},children:[m.jsx("p",{children:"A digital twin is a virtual replica of a physical asset, continuously updated with real-time data from sensors, building management systems, and operational inputs. At Alrazah, we deploy digital twin technology to transform how assets are monitored, maintained, and optimized throughout their lifecycle."}),m.jsx("p",{children:"Unlike static BIM models, our digital twins are living systems that evolve with the asset. They enable predictive maintenance, energy optimization, space utilization analysis, and operational scenario planning — delivering measurable reductions in operating costs and extending asset life."})]})}),m.jsx(Se,{delay:.15,children:m.jsx("ul",{className:"mt-10 space-y-3",children:bM.map(e=>m.jsx(rS,{color:"#B87333",children:e},e))})})]}),m.jsx(Se,{delay:.1,className:"lg:sticky lg:top-24",children:m.jsxs("div",{className:"rounded-xl p-6 md:p-8",style:{backgroundColor:"#0D1B2A",border:"1px solid rgba(201,162,39,0.15)"},children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-[18px] font-medium",style:{color:"#F8F6F1"},children:"Lusail Commercial Tower"}),m.jsx("div",{className:"text-[12px]",style:{color:"#A89F91"},children:"Digital Twin"})]}),m.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.1em]",style:{color:"#00D4AA"},children:[m.jsx("span",{className:"animate-pulse-soft h-2 w-2 rounded-full",style:{backgroundColor:"#00D4AA"}}),"Live"]})]}),m.jsx("div",{className:"mt-6 grid grid-cols-2 gap-4",children:SM.map(e=>m.jsx(kM,{w:e},e.label))}),m.jsxs("div",{className:"mt-8",children:[m.jsx("div",{className:"mb-4 text-[14px] font-medium",style:{color:"#F8F6F1"},children:"Sensor Network"}),m.jsxs("div",{className:"relative rounded-lg p-5",style:{backgroundColor:"rgba(26,42,66,0.6)"},children:[m.jsxs("svg",{viewBox:"0 0 280 120",className:"h-28 w-full",children:[m.jsx("rect",{x:"20",y:"20",width:"240",height:"80",fill:"none",stroke:"rgba(201,162,39,0.25)",strokeWidth:"1",rx:"4"}),m.jsx("line",{x1:"20",y1:"60",x2:"260",y2:"60",stroke:"rgba(201,162,39,0.12)",strokeWidth:"1"}),m.jsx("line",{x1:"140",y1:"20",x2:"140",y2:"100",stroke:"rgba(201,162,39,0.12)",strokeWidth:"1"}),[[60,40],[120,50],[200,45],[230,80],[80,85],[180,75],[40,70],[210,30]].map(([e,t],n)=>m.jsxs("g",{children:[m.jsx("line",{x1:"140",y1:"60",x2:e,y2:t,stroke:"rgba(201,162,39,0.2)",strokeWidth:"1"}),m.jsx("circle",{cx:e,cy:t,r:"4",fill:"#C9A227",children:m.jsx("animate",{attributeName:"opacity",values:"1;0.4;1",dur:"2s",begin:`${n*.2}s`,repeatCount:"indefinite"})})]},n))]}),m.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-1 text-[10px] uppercase tracking-[0.08em]",style:{color:"#A89F91"},children:[m.jsx("span",{children:"Temperature"}),m.jsx("span",{children:"Humidity"}),m.jsx("span",{children:"Occupancy"}),m.jsx("span",{children:"Energy"}),m.jsx("span",{children:"Air Quality"}),m.jsx("span",{children:"Vibration"})]})]})]})]})})]})})}const _M=[{icon:"plane",title:"Aerial Surveying",body:"High-resolution aerial photography and videography for site documentation, progress monitoring, and marketing deliverables. Weekly drone flights provide visual records of construction progress.",specs:[["Resolution","20MP stills, 4K video"],["Coverage","50 hectares per flight"],["Frequency","Weekly on active sites"]]},{icon:"camera",title:"Photogrammetry",body:"3D model generation from overlapping aerial photographs. Used for topographic surveys, volumetric calculations, and as-built documentation. Accuracy within 2cm horizontally and 3cm vertically.",specs:[["Accuracy","±2cm horizontal, ±3cm vertical"],["Output","Point cloud, mesh, orthomosaic"],["Software","Pix4D, Agisoft Metashape"]]},{icon:"scan",title:"LiDAR Scanning",body:"Laser scanning for high-precision 3D capture of existing structures, complex geometries, and as-built conditions. Essential for renovation projects and clash detection with existing conditions.",specs:[["Accuracy","±3mm at 10m range"],["Scan rate","2 million points / second"],["Equipment","Leica RTC360, FARO Focus"]]}];function AM({name:e}){return e==="plane"?m.jsx("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"#C9A227",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M17.8 19.2L16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3-4-3-.3.3c-.3.3-.3.8 0 1.1L4 16l1.3 1.3c.3.3.8.3 1.1 0L7 17l3-2 3.7 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z"})}):e==="camera"?m.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"#C9A227",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"}),m.jsx("circle",{cx:"12",cy:"13",r:"3.5"})]}):m.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"#C9A227",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),m.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),m.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),m.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}),m.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}const H0=[{n:"01",t:"Field Capture",d:"Drone flight or LiDAR scan with ground control points"},{n:"02",t:"Data Processing",d:"Point cloud generation, noise filtering, registration"},{n:"03",t:"3D Modeling",d:"Mesh creation, texture mapping, BIM integration"},{n:"04",t:"Intelligence",d:"Analysis, measurement, comparison, reporting"}];function PM(){return m.jsx("section",{className:"relative py-24 md:py-32 tech-grid-bg",style:{backgroundColor:"#0A1628"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1200px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"dark",accent:"#C9A227",overline:"Drone & Reality Capture",title:"Eyes in the Sky. Precision on the Ground.",subtitle:"We deploy advanced drone technology, photogrammetry, and LiDAR scanning to capture accurate as-built conditions, monitor construction progress, and create detailed 3D models of existing assets. Our reality capture capabilities reduce survey time by 70% and improve accuracy to within 2cm."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 md:grid-cols-3",children:_M.map((e,t)=>m.jsx(Se,{delay:t*.08,children:m.jsxs(qt.div,{whileHover:{y:-4},transition:{duration:.3},className:"h-full rounded-xl p-8",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.08)"},children:[m.jsx(AM,{name:e.icon}),m.jsx("h3",{className:"mt-5 text-[24px] font-normal",style:{color:"#F8F6F1"},children:e.title}),m.jsx("p",{className:"mt-3 text-[14px] leading-[1.6]",style:{color:"#EDE8DF"},children:e.body}),m.jsx("div",{className:"mt-5 border-t pt-4 space-y-2",style:{borderColor:"rgba(201,162,39,0.1)"},children:e.specs.map(([n,s])=>m.jsxs("div",{className:"flex justify-between gap-3 text-[13px]",children:[m.jsx("span",{style:{color:"#A89F91"},children:n}),m.jsx("span",{className:"text-right",style:{color:"#D4B896"},children:s})]},n))})]})},e.title))}),m.jsxs("div",{className:"mt-20",children:[m.jsxs(Se,{className:"text-center",children:[m.jsx("h3",{className:"font-display text-[28px] font-normal md:text-[36px]",style:{color:"#F8F6F1"},children:"Reality Capture Workflow"}),m.jsx("p",{className:"mt-3 text-[16px]",style:{color:"#EDE8DF"},children:"From field capture to actionable intelligence"})]}),m.jsx("div",{className:"mt-12 flex flex-col items-stretch gap-4 md:flex-row md:items-center",children:H0.map((e,t)=>m.jsxs(ln.Fragment,{children:[m.jsx(Se,{delay:t*.08,className:"flex-1",children:m.jsxs("div",{className:"rounded-lg p-6 text-center",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.1)"},children:[m.jsx("div",{className:"text-[14px] font-semibold tracking-[0.1em]",style:{color:"#C9A227"},children:e.n}),m.jsx("div",{className:"mt-3 text-[17px] font-semibold",style:{color:"#F8F6F1"},children:e.t}),m.jsx("div",{className:"mt-2 text-[13px]",style:{color:"#EDE8DF"},children:e.d})]})}),tm.jsx("span",{children:t},t))}),m.jsx("div",{className:"space-y-2",children:e.map(t=>m.jsx("div",{className:"relative h-3 rounded",style:{backgroundColor:"#1A2A42"},children:m.jsx("div",{className:"absolute top-0 h-3 rounded",style:{left:`${t.l}%`,width:`${t.w}%`,backgroundColor:"#C9A227"}})},t.label))})]})}function DM(){return m.jsx("section",{className:"py-24 md:py-32",style:{backgroundColor:"#F8F6F1"},children:m.jsxs("div",{className:"mx-auto grid w-full max-w-[1200px] grid-cols-1 gap-16 px-6 lg:grid-cols-2 lg:items-start",children:[m.jsxs("div",{children:[m.jsx(Se,{children:m.jsx(xa,{color:"#B87333",children:"Project Management Information Systems"})}),m.jsx(Se,{delay:.05,children:m.jsx("h2",{className:"mt-5 max-w-[520px] font-display text-[34px] font-light leading-[1.05] tracking-[-0.02em] md:text-[52px]",style:{color:"#0A1628"},children:"A Single Platform. Complete Visibility. Total Control."})}),m.jsx(Se,{delay:.1,children:m.jsxs("div",{className:"mt-6 space-y-4 text-[16px] leading-[1.8]",style:{color:"#2C3E50"},children:[m.jsx("p",{children:"Our proprietary PMIS integrates scheduling, cost control, document management, quality assurance, and reporting into a single cloud-based platform. Clients receive real-time access to project dashboards, ensuring complete transparency and enabling data-driven decision-making at every stage."}),m.jsx("p",{children:"The system is accessible via web browser and mobile applications, ensuring that project stakeholders — from site engineers to board members — have the information they need, when they need it, on any device."})]})}),m.jsx(Se,{delay:.15,children:m.jsx("ul",{className:"mt-10 space-y-3",children:RM.map(e=>m.jsx(rS,{color:"#B87333",children:e},e))})})]}),m.jsx(Se,{delay:.1,className:"lg:sticky lg:top-24",children:m.jsxs("div",{className:"rounded-xl p-6",style:{backgroundColor:"#0D1B2A",border:"1px solid rgba(201,162,39,0.15)",boxShadow:"0 8px 32px rgba(10,22,40,0.3)"},children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("div",{className:"text-[18px] font-medium",style:{color:"#F8F6F1"},children:"Project Dashboard — Lusail Tower"}),m.jsx("div",{className:"text-[11px]",style:{color:"#A89F91"},children:"Updated: 11 Aug 2026, 09:42"})]}),m.jsx("div",{className:"mt-5 grid grid-cols-3 gap-3",children:NM.map(e=>m.jsxs("div",{className:"rounded-lg p-3",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:[m.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.1em]",style:{color:"#A89F91"},children:e.label}),m.jsx("div",{className:"mt-1 text-[20px]",style:{color:"#C9A227"},children:e.value}),m.jsx("div",{className:"text-[10px]",style:{color:e.color},children:e.trend})]},e.label))}),m.jsx("div",{className:"mt-4",children:m.jsx(OM,{})}),m.jsxs("div",{className:"mt-4 rounded-lg p-4",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:[m.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[0.1em]",style:{color:"#A89F91"},children:"Recent Activity"}),m.jsx("ul",{className:"space-y-2 text-[12px]",style:{color:"#EDE8DF"},children:jM.map(([e,t])=>m.jsxs("li",{className:"flex gap-2",children:[m.jsx("span",{className:"shrink-0",style:{color:"#A89F91"},children:e}),m.jsxs("span",{children:["— ",t]})]},t))})]}),m.jsx("div",{className:"mt-4 flex items-center justify-center gap-4",children:[1,2].map(e=>m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsxs("div",{className:"h-[160px] w-[80px] rounded-[20px] border-[6px] p-2",style:{borderColor:"#1A2A42",backgroundColor:"#0A1628"},children:[m.jsx("div",{className:"h-2 w-full rounded",style:{backgroundColor:"rgba(201,162,39,0.3)"}}),m.jsxs("div",{className:"mt-2 space-y-1.5",children:[m.jsx("div",{className:"h-1.5 w-3/4 rounded",style:{backgroundColor:"rgba(201,162,39,0.5)"}}),m.jsx("div",{className:"h-1.5 w-1/2 rounded",style:{backgroundColor:"rgba(168,159,145,0.4)"}}),m.jsx("div",{className:"mt-3 h-8 rounded",style:{backgroundColor:"rgba(201,162,39,0.15)"}})]})]}),m.jsx("div",{className:"mt-2 text-[10px]",style:{color:"#A89F91"},children:e===1?"iOS":"Android"})]},e))})]})})]})})}const LM=[{icon:"bar",title:"Descriptive Analytics",body:"What happened? Real-time dashboards and reports showing current project status, historical performance, and trend identification across cost, schedule, quality, and safety dimensions.",tools:"Power BI, Tableau, custom Python dashboards"},{icon:"search",title:"Diagnostic Analytics",body:"Why did it happen? Root cause analysis of schedule delays, cost overruns, and quality issues. Correlation analysis identifying factors that predict project success or failure.",tools:"Statistical analysis, regression modeling, anomaly detection"},{icon:"trend",title:"Predictive Analytics",body:"What will happen? Machine learning models predicting schedule slippage, cost escalation, and safety incidents before they occur. Enabling proactive intervention rather than reactive response.",tools:"Python scikit-learn, TensorFlow, time-series forecasting"},{icon:"zap",title:"Prescriptive Analytics",body:"What should we do? Optimization algorithms recommending optimal resource allocation, sequencing strategies, and risk mitigation actions based on predicted outcomes.",tools:"Operations research, Monte Carlo simulation, genetic algorithms"}];function MM({name:e}){const t={width:32,height:32,stroke:"#C9A227",strokeWidth:1.5,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"};return e==="bar"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"10"}),m.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"4"}),m.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"}),m.jsx("line",{x1:"3",y1:"20",x2:"21",y2:"20"})]}):e==="search"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("circle",{cx:"11",cy:"11",r:"7"}),m.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}):e==="trend"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),m.jsx("polyline",{points:"16 7 22 7 22 13"})]}):m.jsx("svg",{...t,viewBox:"0 0 24 24",children:m.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const q0=[{n:"01",t:"Data Collection",d:"Sensors, IoT devices, manual entry, system APIs"},{n:"02",t:"Data Integration",d:"ETL pipelines, data lake, quality validation"},{n:"03",t:"Data Storage",d:"Cloud data warehouse, structured & unstructured"},{n:"04",t:"Analytics Engine",d:"ML models, statistical analysis, visualization"},{n:"05",t:"Intelligence Delivery",d:"Dashboards, alerts, reports, API feeds"}];function FM(){return m.jsx("section",{className:"relative py-24 md:py-32 tech-grid-bg",style:{backgroundColor:"#0A1628"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1100px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"dark",accent:"#C9A227",overline:"Data & Analytics",title:"Turning Project Data into Predictive Intelligence",subtitle:"Every project generates millions of data points. Our analytics platform transforms this raw data into actionable intelligence — enabling proactive decision-making, risk prediction, and continuous performance optimization."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 md:grid-cols-2",children:LM.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs(qt.div,{whileHover:{y:-4},transition:{duration:.3},className:"h-full rounded-xl p-8",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.08)"},children:[m.jsx(MM,{name:e.icon}),m.jsx("h3",{className:"mt-5 text-[26px] font-normal",style:{color:"#F8F6F1"},children:e.title}),m.jsx("p",{className:"mt-3 text-[14px] leading-[1.6]",style:{color:"#EDE8DF"},children:e.body}),m.jsx("div",{className:"mt-4 text-[12px]",style:{color:"#A89F91"},children:e.tools})]})},e.title))}),m.jsxs("div",{className:"mt-20",children:[m.jsxs(Se,{className:"text-center",children:[m.jsx("h3",{className:"font-display text-[28px] font-normal md:text-[36px]",style:{color:"#F8F6F1"},children:"Data Pipeline Architecture"}),m.jsx("p",{className:"mt-3 text-[16px]",style:{color:"#EDE8DF"},children:"From raw data to actionable intelligence"})]}),m.jsx("div",{className:"mt-12 flex flex-col items-stretch gap-4 md:flex-row md:items-center",children:q0.map((e,t)=>m.jsxs(ln.Fragment,{children:[m.jsx(Se,{delay:t*.07,className:"flex-1",children:m.jsxs("div",{className:"rounded-lg p-5 text-center",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.1)"},children:[m.jsx("div",{className:"text-[13px] font-semibold tracking-[0.1em]",style:{color:"#C9A227"},children:e.n}),m.jsx("div",{className:"mt-2 text-[15px] font-semibold",style:{color:"#F8F6F1"},children:e.t}),m.jsx("div",{className:"mt-1.5 text-[11px] leading-[1.4]",style:{color:"#EDE8DF"},children:e.d})]})}),tm.jsx(Se,{delay:t*.08,children:m.jsxs(qt.div,{whileHover:{y:-4},transition:{duration:.3},className:"h-full overflow-hidden rounded-xl",style:{backgroundColor:"#F8F6F1",border:"1px solid rgba(10,22,40,0.08)"},children:[m.jsxs("div",{className:"relative h-[200px] overflow-hidden",children:[m.jsx("img",{src:e.img,alt:e.title,className:"h-full w-full object-cover transition-transform duration-500 hover:scale-105"}),m.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to top, rgba(10,22,40,0.6), transparent)"}})]}),m.jsxs("div",{className:"p-6",children:[m.jsx(nS,{tone:e.tone,children:e.status}),m.jsx("h3",{className:"mt-3 text-[20px] font-medium",style:{color:"#0A1628"},children:e.title}),m.jsx("p",{className:"mt-2 text-[14px] leading-[1.6]",style:{color:"#2C3E50"},children:e.desc}),m.jsx("div",{className:"mt-4 text-[12px]",style:{color:"#A89F91"},children:e.partners})]})]})},e.title))}),m.jsx("div",{className:"mt-16 grid grid-cols-2 gap-5 md:grid-cols-4",children:BM.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs("div",{className:"rounded-xl p-8 text-center",style:{backgroundColor:"rgba(10,22,40,0.04)",border:"1px solid rgba(10,22,40,0.06)"},children:[m.jsx("div",{className:"font-display text-[40px] font-light md:text-[56px]",style:{color:"#B87333"},children:m.jsx(ap,{to:e.value,prefix:e.prefix||"",suffix:e.suffix||""})}),m.jsx("div",{className:"mt-2 text-[13px]",style:{color:"#2C3E50"},children:e.label})]})},e.label))})]})})}const UM=[{icon:"pen",title:"Design & Engineering",items:[["Autodesk Revit","2024","BIM modeling"],["Autodesk Navisworks","2024","Clash detection"],["Autodesk AutoCAD","2024","2D documentation"],["ETABS","21","Structural analysis"],["STAAD.Pro","V8i","Structural design"],["SketchUp Pro","2024","Concept modeling"]]},{icon:"cal",title:"Project Management",items:[["Primavera P6","R21","Enterprise scheduling"],["Microsoft Project","2021","Schedule management"],["Aconex","Cloud","Document control"],["Procore","Cloud","Construction management"],["BIM 360","Cloud","BIM collaboration"],["Power BI","Cloud","Business intelligence"]]},{icon:"cost",title:"Cost & Estimating",items:[["CostX","6.0","Quantity takeoff"],["Candy","v18","Estimating & planning"],["Excel","365","Custom models"],["Custom APIs","v2.1","System integration"]]},{icon:"cam",title:"Reality Capture & Survey",items:[["Pix4D","4.8","Photogrammetry"],["Agisoft Metashape","2.0","3D reconstruction"],["Leica Cyclone","2023","LiDAR processing"],["DroneDeploy","Cloud","Aerial mapping"],["FARO Scene","2023","Scan processing"]]}];function zM({name:e}){const t={width:32,height:32,stroke:"#C9A227",strokeWidth:1.5,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"};return e==="pen"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("path",{d:"M12 19l7-7 3 3-7 7-3-3z"}),m.jsx("path",{d:"M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"}),m.jsx("path",{d:"M2 2l7.586 7.586"}),m.jsx("circle",{cx:"11",cy:"11",r:"2"})]}):e==="cal"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),m.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),m.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),m.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}):e==="cost"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("rect",{x:"4",y:"2",width:"16",height:"20",rx:"2"}),m.jsx("line",{x1:"8",y1:"6",x2:"16",y2:"6"}),m.jsx("line",{x1:"8",y1:"10",x2:"16",y2:"10"}),m.jsx("line",{x1:"8",y1:"14",x2:"12",y2:"14"})]}):m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"}),m.jsx("circle",{cx:"12",cy:"13",r:"3.5"})]})}const $M=[["Primary Provider","Microsoft Azure (UAE North)"],["Backup Provider","AWS (Bahrain)"],["Uptime SLA","99.9%"],["Data Residency","GCC region"],["Encryption","AES-256 at rest, TLS 1.3 in transit"],["Disaster Recovery","4-hour RTO, 1-hour RPO"]];function WM(){return m.jsx("section",{className:"relative py-24 md:py-32 tech-grid-bg",style:{backgroundColor:"#0F1D33"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1100px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"dark",accent:"#C9A227",overline:"Software Stack",title:"Industry-Leading Tools. Qatar-Optimized Workflows.",subtitle:"Our technology stack combines established industry standards with cutting-edge innovations, all integrated into workflows optimized for Qatar's regulatory environment and construction practices."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 md:grid-cols-2",children:UM.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs("div",{className:"h-full rounded-xl p-8",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.08)"},children:[m.jsx(zM,{name:e.icon}),m.jsx("h3",{className:"mt-4 text-[24px] font-normal",style:{color:"#F8F6F1"},children:e.title}),m.jsx("div",{className:"mt-5 space-y-2.5",children:e.items.map(n=>m.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[m.jsx("span",{className:"font-medium",style:{color:"#EDE8DF"},children:n[0]}),m.jsx("span",{className:"text-[12px]",style:{color:"#A89F91"},children:n[1]}),m.jsx("span",{className:"ml-auto text-right",style:{color:"#A89F91"},children:n[2]})]},n[0]))})]})},e.title))}),m.jsxs("div",{className:"mt-16 grid grid-cols-1 gap-8 md:grid-cols-2",children:[m.jsxs(Se,{children:[m.jsx("h3",{className:"text-[28px] font-normal",style:{color:"#F8F6F1"},children:"Cloud Infrastructure"}),m.jsx("p",{className:"mt-4 text-[15px] leading-[1.7]",style:{color:"#EDE8DF"},children:"All project data is hosted on secure, redundant cloud infrastructure with 99.9% uptime SLA. Our hybrid cloud architecture combines public cloud scalability with private cloud security for sensitive project information."})]}),m.jsx(Se,{delay:.1,children:m.jsx("div",{className:"space-y-3",children:$M.map(([e,t])=>m.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-lg p-4",style:{backgroundColor:"rgba(26,42,66,0.5)",border:"1px solid rgba(201,162,39,0.1)"},children:[m.jsx("span",{className:"text-[12px]",style:{color:"#A89F91"},children:e}),m.jsx("span",{className:"text-right text-[14px] font-semibold",style:{color:"#C9A227"},children:t})]},e))})})]})]})})}const HM=[{icon:"lock",title:"Access Control",body:"Role-based access control (RBAC) ensures users only access data relevant to their responsibilities. Multi-factor authentication (MFA) is mandatory for all system access.",details:[["MFA enforced","100% of users"],["Password policy","NIST-compliant"],["Session timeout","30 minutes"],["Privilege review","Quarterly"]]},{icon:"shield",title:"Data Protection",body:"All data is encrypted at rest (AES-256) and in transit (TLS 1.3). Regular backups with 1-hour RPO and 4-hour RTO. Data loss prevention (DLP) policies prevent unauthorized exfiltration.",details:[["Encryption","AES-256 at rest"],["Backup frequency","Hourly"],["Retention","7 years"],["DLP","Active monitoring"]]},{icon:"eye",title:"Threat Monitoring",body:"24/7 security operations center (SOC) monitoring for suspicious activity. Automated threat detection, intrusion prevention, and incident response protocols.",details:[["SOC","24/7 monitoring"],["SIEM","Splunk Enterprise"],["Penetration testing","Quarterly"],["Incident response","< 1 hour"]]},{icon:"check",title:"Compliance",body:"Full compliance with Qatar Data Protection Law (No. 13 of 2016), ISO 27001:2013, and industry-specific security standards. Regular third-party audits and compliance assessments.",details:[["Certification","ISO 27001:2013"],["Regulation","Qatar Data Protection Law"],["External audit","Annual"],["Critical findings","Zero (5 years)"]]}];function qM({name:e}){const t={width:32,height:32,stroke:"#B87333",strokeWidth:1.5,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"};return e==="lock"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),m.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}):e==="shield"?m.jsx("svg",{...t,viewBox:"0 0 24 24",children:m.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}):e==="eye"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),m.jsx("circle",{cx:"12",cy:"12",r:"3"})]}):m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("polyline",{points:"9 11 12 14 22 4"}),m.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}function KM(){return m.jsx("section",{className:"py-24 md:py-32",style:{backgroundColor:"#F8F6F1"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1100px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"light",accent:"#B87333",overline:"Cybersecurity",title:"Enterprise-Grade Security for Construction Data",subtitle:"Construction projects generate vast quantities of sensitive data — designs, costs, schedules, and contractual information. Our cybersecurity framework ensures this data is protected against unauthorized access, loss, and cyber threats."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 md:grid-cols-2",children:HM.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs(qt.div,{whileHover:{y:-4},transition:{duration:.3},className:"h-full rounded-xl p-8",style:{backgroundColor:"#F8F6F1",border:"1px solid rgba(10,22,40,0.08)"},children:[m.jsx(qM,{name:e.icon}),m.jsx("h3",{className:"mt-4 text-[24px] font-normal",style:{color:"#0A1628"},children:e.title}),m.jsx("p",{className:"mt-3 text-[14px] leading-[1.6]",style:{color:"#2C3E50"},children:e.body}),m.jsx("div",{className:"mt-5 space-y-2 border-t pt-4",style:{borderColor:"rgba(10,22,40,0.08)"},children:e.details.map(([n,s])=>m.jsxs("div",{className:"flex justify-between text-[13px]",children:[m.jsx("span",{style:{color:"#A89F91"},children:n}),m.jsx("span",{className:"font-medium",style:{color:"#B87333"},children:s})]},n))})]})},e.title))})]})})}const QM=["Real-time project dashboards with customizable KPIs","Document library with version control and search","Photo gallery with geotagging and timeline","Meeting minutes and action item tracking","Direct messaging with project team","Mobile app for iOS and Android","Automated email alerts for critical events"],GM=["Dashboard","Documents","Photos","Schedule","Cost","Quality","Safety","Reports"],YM=[["Progress","78.4%"],["Budget","QAR 251M"],["Schedule","+2 days"],["Quality","98.4%"]],XM=["RFI-2842 responded","Weekly report published","Concrete pour — L12"];function JM(){return m.jsx("section",{className:"relative py-24 md:py-32 tech-grid-bg",style:{backgroundColor:"#0A1628"},children:m.jsxs("div",{className:"mx-auto grid w-full max-w-[1200px] grid-cols-1 gap-16 px-6 lg:grid-cols-2 lg:items-center",children:[m.jsxs("div",{children:[m.jsx(Se,{children:m.jsx(xa,{color:"#C9A227",children:"Client Portal"})}),m.jsx(Se,{delay:.05,children:m.jsx("h2",{className:"mt-5 max-w-[480px] font-display text-[34px] font-light leading-[1.05] tracking-[-0.02em] md:text-[52px]",style:{color:"#F8F6F1"},children:"Your Project. Your Data. Your Dashboard."})}),m.jsx(Se,{delay:.1,children:m.jsxs("div",{className:"mt-6 space-y-4 text-[16px] leading-[1.8]",style:{color:"#EDE8DF"},children:[m.jsx("p",{children:"Our client portal provides real-time, 24/7 access to project information. No more waiting for weekly reports or monthly meetings — clients can monitor progress, review documents, track costs, and communicate with the project team at any time, from any device."}),m.jsx("p",{children:"The portal is customizable to each client's preferences, with role-based views ensuring executives see strategic dashboards while site teams access operational data."})]})}),m.jsx(Se,{delay:.15,children:m.jsx("ul",{className:"mt-10 space-y-3",children:QM.map(e=>m.jsx(dM,{color:"#C9A227",children:e},e))})})]}),m.jsxs(Se,{delay:.1,children:[m.jsxs("div",{className:"overflow-hidden rounded-xl",style:{backgroundColor:"#0D1B2A",border:"1px solid rgba(201,162,39,0.15)",boxShadow:"0 8px 32px rgba(10,22,40,0.3)"},children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",style:{backgroundColor:"rgba(26,42,66,0.8)"},children:[m.jsx("span",{className:"h-2.5 w-2.5 rounded-full opacity-50",style:{backgroundColor:"#A89F91"}}),m.jsx("span",{className:"h-2.5 w-2.5 rounded-full opacity-50",style:{backgroundColor:"#A89F91"}}),m.jsx("span",{className:"h-2.5 w-2.5 rounded-full opacity-50",style:{backgroundColor:"#A89F91"}}),m.jsx("span",{className:"ml-auto text-[11px]",style:{color:"#A89F91"},children:"alrazah.pm/client-portal"})]}),m.jsxs("div",{className:"flex",children:[m.jsx("div",{className:"w-[150px] shrink-0 space-y-1 p-4",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:GM.map((e,t)=>m.jsx("div",{className:"rounded px-3 py-2 text-[12px]",style:t===0?{color:"#C9A227",backgroundColor:"rgba(201,162,39,0.1)"}:{color:"#EDE8DF"},children:e},e))}),m.jsxs("div",{className:"flex-1 p-5",children:[m.jsx("div",{className:"text-[16px] font-medium",style:{color:"#F8F6F1"},children:"Project Overview — Lusail Tower"}),m.jsx("div",{className:"mt-4 grid grid-cols-2 gap-2.5",children:YM.map(([e,t])=>m.jsxs("div",{className:"rounded-lg p-3",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:[m.jsx("div",{className:"text-[9px] uppercase tracking-[0.1em]",style:{color:"#A89F91"},children:e}),m.jsx("div",{className:"text-[18px]",style:{color:"#C9A227"},children:t})]},e))}),m.jsxs("div",{className:"mt-3 h-[90px] rounded-lg p-3",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:[m.jsx("div",{className:"text-[9px] uppercase tracking-[0.1em]",style:{color:"#A89F91"},children:"Progress trend"}),m.jsx("svg",{viewBox:"0 0 200 50",className:"mt-1 h-12 w-full",preserveAspectRatio:"none",children:m.jsx("polyline",{points:"0,40 30,32 60,36 90,22 120,26 150,14 180,18 200,10",fill:"none",stroke:"#C9A227",strokeWidth:"2"})})]}),m.jsxs("div",{className:"mt-3 rounded-lg p-3",style:{backgroundColor:"rgba(26,42,66,0.5)"},children:[m.jsx("div",{className:"text-[9px] uppercase tracking-[0.1em]",style:{color:"#A89F91"},children:"Recent activity"}),m.jsx("ul",{className:"mt-1.5 space-y-1 text-[11px]",style:{color:"#EDE8DF"},children:XM.map(e=>m.jsxs("li",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"h-1 w-1 rounded-full",style:{backgroundColor:"#C9A227"}}),e]},e))})]})]})]})]}),m.jsxs("a",{href:"#downloads",className:"group mt-6 inline-flex w-full items-center justify-center gap-2 rounded-full px-7 py-3.5 text-[14px] font-semibold transition-all hover:scale-[1.01]",style:{backgroundColor:"#C9A227",color:"#0A1628"},children:["Request Portal Demo",m.jsx(th,{size:15,className:"transition-transform group-hover:translate-x-1"})]})]})]})})}const ZM=[{icon:"zap",title:"Energy Modeling",body:"Dynamic thermal simulation predicting energy consumption, peak loads, and HVAC sizing. Enables optimization of building envelope, orientation, and systems before construction.",tools:"IES VE, EnergyPlus, Green Building Studio"},{icon:"leaf",title:"Carbon Tracking",body:"Embodied carbon calculation for materials and construction processes. Operational carbon tracking post-handover. Supports net-zero pathway planning and carbon offset strategies.",tools:"One Click LCA, EC3, custom carbon calculators"},{icon:"sun",title:"Daylight & Comfort Analysis",body:"Daylight autonomy, glare analysis, and thermal comfort simulation ensuring occupant wellbeing while minimizing artificial lighting and cooling loads.",tools:"Radiance, DAYSIM, Ladybug Tools"},{icon:"layers",title:"Sustainable Materials Database",body:"Comprehensive database of construction materials with environmental product declarations (EPDs), recycled content data, and regional availability. Enables informed material selection.",tools:"EC3, Building Transparency, custom database"}];function eF({name:e}){const t={width:32,height:32,stroke:"#7A8B6E",strokeWidth:1.5,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"};return e==="zap"?m.jsx("svg",{...t,viewBox:"0 0 24 24",children:m.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})}):e==="leaf"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10z"}),m.jsx("path",{d:"M2 21c0-3 1.85-5.36 5.08-6"})]}):e==="sun"?m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("circle",{cx:"12",cy:"12",r:"4"}),m.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"})]}):m.jsxs("svg",{...t,viewBox:"0 0 24 24",children:[m.jsx("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),m.jsx("polyline",{points:"2 17 12 22 22 17"}),m.jsx("polyline",{points:"2 12 12 17 22 12"})]})}function tF(){return m.jsx("section",{className:"py-24 md:py-32",style:{backgroundColor:"#F8F6F1"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1100px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"light",accent:"#B87333",overline:"Sustainability Technology",title:"Technology for a Sustainable Qatar",subtitle:"Our sustainability technology stack enables us to design, build, and operate assets that minimize environmental impact while maximizing operational efficiency — directly supporting Qatar National Vision 2030 environmental objectives."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 md:grid-cols-2",children:ZM.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs(qt.div,{whileHover:{y:-4},transition:{duration:.3},className:"h-full rounded-xl p-8",style:{backgroundColor:"#F8F6F1",border:"1px solid rgba(10,22,40,0.08)"},children:[m.jsx(eF,{name:e.icon}),m.jsx("h3",{className:"mt-4 text-[24px] font-normal",style:{color:"#0A1628"},children:e.title}),m.jsx("p",{className:"mt-3 text-[14px] leading-[1.6]",style:{color:"#2C3E50"},children:e.body}),m.jsx("div",{className:"mt-4 text-[12px]",style:{color:"#A89F91"},children:e.tools})]})},e.title))})]})})}const nF=[{title:"BIM Certification Program",desc:"Structured pathway from BIM Fundamentals to Advanced Coordination, aligned to ISO 19650 and buildingSMART standards.",metrics:[["Certified professionals","12"],["Avg. certification time","6 months"]]},{title:"Software Training",desc:"Vendor-aligned training on Revit, Navisworks, Primavera P6, Synchro and the full AEC collection — delivered by certified instructors.",metrics:[["Software platforms","18"],["Training hours / yr","2,400"]]},{title:"Digital Literacy",desc:"Organization-wide baseline ensuring every team member — from site to boardroom — is fluent in digital project delivery.",metrics:[["Staff digitally certified","94%"],["Refresh cadence","Annual"]]},{title:"Continuous Learning",desc:"Innovation Lab seminars, vendor webinars, and a dedicated R&D time allocation keep our teams ahead of the technology curve.",metrics:[["R&D time allocation","10%"],["Seminars / yr","40+"]]}],rF=[{label:"Certified BIM Professionals",value:12},{label:"Training Hours / Year",value:2400,suffix:"+"},{label:"Staff Digitally Certified",value:94,suffix:"%"},{label:"Software Platforms Mastered",value:18}];function sF(){return m.jsx("section",{className:"relative py-24 md:py-32 tech-grid-bg",style:{backgroundColor:"#0F1D33"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1100px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"dark",accent:"#C9A227",overline:"Training & Certification",title:"A Team Trained for the Digital Age",subtitle:"Technology is only as capable as the people who wield it. Alrazah invests continuously in building digital competency across the entire organization — from BIM specialists to field engineers — ensuring our teams operate at the frontier of construction technology."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 md:grid-cols-2",children:nF.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs("div",{className:"h-full rounded-xl p-8",style:{backgroundColor:"#1A2A42",border:"1px solid rgba(201,162,39,0.08)"},children:[m.jsx("h3",{className:"text-[22px] font-medium",style:{color:"#F8F6F1"},children:e.title}),m.jsx("p",{className:"mt-3 text-[14px] leading-[1.6]",style:{color:"#EDE8DF"},children:e.desc}),m.jsx("div",{className:"mt-5 flex gap-8 border-t pt-4",style:{borderColor:"rgba(201,162,39,0.1)"},children:e.metrics.map(([n,s])=>m.jsxs("div",{children:[m.jsx("div",{className:"text-[22px] font-light",style:{color:"#C9A227"},children:s}),m.jsx("div",{className:"text-[11px]",style:{color:"#A89F91"},children:n})]},n))})]})},e.title))}),m.jsx("div",{className:"mt-16 grid grid-cols-2 gap-5 md:grid-cols-4",children:rF.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs("div",{className:"rounded-xl p-6 text-center",style:{backgroundColor:"rgba(26,42,66,0.5)",border:"1px solid rgba(201,162,39,0.1)"},children:[m.jsx("div",{className:"font-display text-[36px] font-light md:text-[44px]",style:{color:"#C9A227"},children:m.jsx(ap,{to:e.value,suffix:e.suffix||""})}),m.jsx("div",{className:"mt-2 text-[12px]",style:{color:"#EDE8DF"},children:e.label})]})},e.label))})]})})}const iF=[{label:"Technology Partners",items:["Autodesk","Bentley Systems","NVIDIA","Trimble","IBM"]},{label:"Software Vendors",items:["Aconex (Oracle)","Procore","Solibri","PIX4D","Leica Geosystems"]},{label:"Research Institutions",items:["Qatar University","HBKU","TAMU Qatar","buildingSMART"]},{label:"Co-Development",items:["Qatar Steel R&D","Qatar Development Bank","Mwani Qatar"]}];function oF(){return m.jsx("section",{className:"py-24 md:py-32",style:{backgroundColor:"#F8F6F1"},children:m.jsxs("div",{className:"mx-auto w-full max-w-[1100px] px-6",children:[m.jsx(Se,{children:m.jsx(sr,{tone:"light",accent:"#B87333",overline:"Technology Alliances",title:"Technology Alliances",subtitle:"Our capability is amplified by deep alliances with the world's leading technology vendors, research institutions, and co-development partners — keeping us at the frontier of construction technology, in Qatar and beyond."})}),m.jsx("div",{className:"mt-16 grid grid-cols-1 gap-6 sm:grid-cols-2",children:iF.map((e,t)=>m.jsx(Se,{delay:t*.06,children:m.jsxs("div",{className:"h-full rounded-xl p-8",style:{backgroundColor:"#F8F6F1",border:"1px solid rgba(10,22,40,0.08)"},children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.14em]",style:{color:"#B87333"},children:e.label}),m.jsx("div",{className:"mt-5 flex flex-wrap gap-2.5",children:e.items.map(n=>m.jsx("span",{className:"rounded-lg px-4 py-2 text-[14px] font-medium",style:{backgroundColor:"rgba(10,22,40,0.04)",color:"#0A1628",border:"1px solid rgba(10,22,40,0.06)"},children:n},n))})]})},e.label))})]})})}const aF=[{title:"Technology Whitepaper",desc:"An overview of Alrazah's digital project delivery ecosystem, metrics, and case studies.",type:"PDF · 3.2 MB"},{title:"BIM Execution Plan Sample",desc:"A redacted BEP demonstrating our ISO 19650-aligned coordination methodology.",type:"PDF · 1.8 MB"},{title:"Digital Twin Datasheet",desc:"Specifications, integrations, and performance outcomes for our digital twin deployments.",type:"PDF · 1.1 MB"}];function lF(){const[e,t]=k.useState(!1);return m.jsx("section",{id:"downloads",className:"relative py-24 md:py-32",style:{backgroundColor:"#0A1628"},children:m.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-6",children:m.jsxs("div",{className:"grid grid-cols-1 gap-16 lg:grid-cols-2 lg:items-start",children:[m.jsxs("div",{children:[m.jsx(Se,{children:m.jsx(xa,{color:"#C9A227",children:"Experience the Technology"})}),m.jsx(Se,{delay:.05,children:m.jsx("h2",{className:"mt-5 font-display text-[34px] font-light leading-[1.05] tracking-[-0.02em] md:text-[52px]",style:{color:"#F8F6F1"},children:"Experience the Technology"})}),m.jsx(Se,{delay:.1,children:m.jsx("p",{className:"mt-5 max-w-[480px] text-[16px] leading-[1.8]",style:{color:"#EDE8DF"},children:"Download our technology resources or request a live demonstration of our digital project delivery platform. Our team will walk you through real project dashboards, BIM coordination, and digital twin environments."})}),m.jsx("div",{className:"mt-10 space-y-4",children:aF.map((n,s)=>m.jsx(Se,{delay:.1+s*.05,children:m.jsxs("div",{className:"flex items-center gap-4 rounded-xl p-5 transition-colors hover:bg-[rgba(201,162,39,0.05)]",style:{border:"1px solid rgba(201,162,39,0.12)"},children:[m.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:"rgba(201,162,39,0.1)"},children:m.jsx(P2,{size:20,style:{color:"#C9A227"}})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-[15px] font-medium",style:{color:"#F8F6F1"},children:n.title}),m.jsx("div",{className:"text-[13px]",style:{color:"#A89F91"},children:n.desc})]}),m.jsxs("div",{className:"text-right",children:[m.jsx("div",{className:"text-[11px]",style:{color:"#A89F91"},children:n.type}),m.jsxs("button",{className:"mt-1 inline-flex items-center gap-1 text-[13px] font-semibold",style:{color:"#C9A227"},children:[m.jsx(Mx,{size:14})," Download"]})]})]})},n.title))})]}),m.jsx(Se,{delay:.1,children:m.jsxs("div",{className:"rounded-xl p-8",style:{backgroundColor:"#0F1D33",border:"1px solid rgba(201,162,39,0.15)"},children:[m.jsx("h3",{className:"text-[24px] font-medium",style:{color:"#F8F6F1"},children:"Request a Technology Demo"}),m.jsx("p",{className:"mt-2 text-[14px]",style:{color:"#EDE8DF"},children:"Tell us about your project and we'll arrange a tailored walkthrough."}),e?m.jsxs("div",{className:"mt-8 flex flex-col items-center gap-3 rounded-lg p-10 text-center",style:{backgroundColor:"rgba(0,212,170,0.08)",border:"1px solid rgba(0,212,170,0.3)"},children:[m.jsx(T2,{size:40,style:{color:"#00D4AA"}}),m.jsx("div",{className:"text-[18px] font-medium",style:{color:"#F8F6F1"},children:"Request received"}),m.jsx("p",{className:"text-[14px]",style:{color:"#EDE8DF"},children:"Our technology team will contact you within one business day."})]}):m.jsxs("form",{className:"mt-6 space-y-4",onSubmit:n=>{n.preventDefault(),t(!0)},children:[m.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[m.jsx(ai,{label:"Full name",required:!0,children:m.jsx("input",{required:!0,className:"w-full rounded-lg px-4 py-2.5 text-[14px] outline-none",style:{backgroundColor:"rgba(26,42,66,0.6)",border:"1px solid rgba(201,162,39,0.15)",color:"#F8F6F1"},placeholder:"Your name"})}),m.jsx(ai,{label:"Organization",required:!0,children:m.jsx("input",{required:!0,className:"w-full rounded-lg px-4 py-2.5 text-[14px] outline-none",style:{backgroundColor:"rgba(26,42,66,0.6)",border:"1px solid rgba(201,162,39,0.15)",color:"#F8F6F1"},placeholder:"Company"})})]}),m.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[m.jsx(ai,{label:"Work email",required:!0,children:m.jsx("input",{type:"email",required:!0,className:"w-full rounded-lg px-4 py-2.5 text-[14px] outline-none",style:{backgroundColor:"rgba(26,42,66,0.6)",border:"1px solid rgba(201,162,39,0.15)",color:"#F8F6F1"},placeholder:"you@company.com"})}),m.jsx(ai,{label:"Phone",children:m.jsx("input",{className:"w-full rounded-lg px-4 py-2.5 text-[14px] outline-none",style:{backgroundColor:"rgba(26,42,66,0.6)",border:"1px solid rgba(201,162,39,0.15)",color:"#F8F6F1"},placeholder:"+974 ..."})})]}),m.jsx(ai,{label:"Area of interest",children:m.jsxs("select",{className:"w-full rounded-lg px-4 py-2.5 text-[14px] outline-none",style:{backgroundColor:"rgba(26,42,66,0.6)",border:"1px solid rgba(201,162,39,0.15)",color:"#F8F6F1"},children:[m.jsx("option",{style:{backgroundColor:"#0F1D33"},children:"BIM & Coordination"}),m.jsx("option",{style:{backgroundColor:"#0F1D33"},children:"Digital Twin"}),m.jsx("option",{style:{backgroundColor:"#0F1D33"},children:"PMIS / Client Portal"}),m.jsx("option",{style:{backgroundColor:"#0F1D33"},children:"Reality Capture"}),m.jsx("option",{style:{backgroundColor:"#0F1D33"},children:"Data & Analytics"})]})}),m.jsx(ai,{label:"Message",children:m.jsx("textarea",{rows:3,className:"w-full rounded-lg px-4 py-2.5 text-[14px] outline-none",style:{backgroundColor:"rgba(26,42,66,0.6)",border:"1px solid rgba(201,162,39,0.15)",color:"#F8F6F1"},placeholder:"Tell us about your project..."})}),m.jsxs("button",{type:"submit",className:"group flex w-full items-center justify-center gap-2 rounded-full px-7 py-3.5 text-[14px] font-semibold transition-all hover:scale-[1.01]",style:{backgroundColor:"#C9A227",color:"#0A1628"},children:["Request Demo",m.jsx(th,{size:15,className:"transition-transform group-hover:translate-x-1"})]})]}),m.jsxs("div",{className:"mt-8 flex flex-wrap gap-6 border-t pt-6 text-[13px]",style:{borderColor:"rgba(201,162,39,0.1)",color:"#A89F91"},children:[m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(O2,{size:14,style:{color:"#C9A227"}})," technology@alrazah.qa"]}),m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(L2,{size:14,style:{color:"#C9A227"}})," +974 4400 0000"]})]})]})})]})})})}function ai({label:e,required:t,children:n}){return m.jsxs("label",{className:"block",children:[m.jsxs("span",{className:"mb-1.5 block text-[12px] font-medium",style:{color:"#A89F91"},children:[e,t&&m.jsx("span",{style:{color:"#C9A227"},children:" *"})]}),n]})}const cF=[{title:"Our Business",links:["Project Management","Construction","Engineering","Consultancy"]},{title:"Technology",links:["BIM","Digital Twin","PMIS","Reality Capture"]},{title:"Company",links:["About","Leadership","Careers","Newsroom"]},{title:"Connect",links:["Contact","Partnerships","RFP Portal","Client Login"]}];function uF(){return m.jsxs("footer",{className:"relative overflow-hidden pt-20 pb-10",style:{backgroundColor:"#070F1E"},children:[m.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"radial-gradient(circle at 30% 50%, #C9A227 1px, transparent 1px), radial-gradient(circle at 70% 30%, #C9A227 1px, transparent 1px)",backgroundSize:"60px 60px"}}),m.jsxs("div",{className:"relative mx-auto w-full max-w-[1200px] px-6",children:[m.jsxs("div",{className:"flex flex-col gap-12 lg:flex-row lg:items-start lg:justify-between",children:[m.jsxs("div",{className:"max-w-[360px]",children:[m.jsxs("div",{className:"font-display text-[22px] font-semibold tracking-tight",style:{color:"#F8F6F1"},children:["Alrazah",m.jsx("span",{style:{color:"#C9A227"},children:" Holding"})]}),m.jsx("p",{className:"mt-4 text-[14px] leading-[1.7]",style:{color:"#A89F91"},children:"A digital-native project delivery organization building Qatar's future skyline with intelligence, precision, and institutional gravitas."}),m.jsx("div",{className:"mt-6 text-[12px] uppercase tracking-[0.14em]",style:{color:"#C9A227"},children:"Doha · Qatar"})]}),m.jsx("div",{className:"grid grid-cols-2 gap-8 sm:grid-cols-4",children:cF.map(e=>m.jsxs("div",{children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.14em]",style:{color:"#C9A227"},children:e.title}),m.jsx("ul",{className:"mt-4 space-y-2.5",children:e.links.map(t=>m.jsx("li",{children:m.jsx(Bo,{to:"/",className:"text-[14px] transition-colors hover:text-[#F8F6F1]",style:{color:"#A89F91"},children:t})},t))})]},e.title))})]}),m.jsxs("div",{className:"mt-16 flex flex-col items-center justify-between gap-4 border-t pt-8 sm:flex-row",style:{borderColor:"rgba(201,162,39,0.1)"},children:[m.jsxs("div",{className:"text-[12px]",style:{color:"#A89F91"},children:["© ",new Date().getFullYear()," Alrazah Holding. All rights reserved."]}),m.jsxs("div",{className:"flex items-center gap-6 text-[12px]",style:{color:"#A89F91"},children:[m.jsx(Bo,{to:"/",className:"transition-colors hover:text-[#F8F6F1]",children:"Privacy"}),m.jsx(Bo,{to:"/",className:"transition-colors hover:text-[#F8F6F1]",children:"Terms"}),m.jsxs("a",{href:"#top",className:"flex items-center gap-1.5 transition-colors hover:text-[#C9A227]",children:["Back to top ",m.jsx(S2,{size:13})]})]})]})]})]})}function dF(){const[e,t]=k.useState("top");return k.useEffect(()=>{const n=()=>t(window.scrollY>80?"solid":"top");return window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[]),m.jsx("div",{className:"fixed left-0 right-0 top-0 z-50 transition-all duration-300",style:{backgroundColor:e==="solid"?"rgba(10,22,40,0.92)":"transparent",backdropFilter:e==="solid"?"blur(12px)":"none",borderBottom:e==="solid"?"1px solid rgba(201,162,39,0.12)":"1px solid transparent"},children:m.jsxs("div",{className:"mx-auto flex w-full max-w-[1400px] items-center justify-between px-6 py-4",children:[m.jsxs("a",{href:"#top",className:"font-display text-[18px] font-semibold tracking-tight",style:{color:"#F8F6F1"},children:["Alrazah",m.jsx("span",{style:{color:"#C9A227"},children:"."})]}),m.jsx("a",{href:"#downloads",className:"rounded-full px-5 py-2 text-[13px] font-semibold transition-all hover:scale-[1.02]",style:{backgroundColor:"#C9A227",color:"#0A1628"},children:"Request Demo"})]})})}function fF(){return m.jsxs("div",{id:"top",className:"min-h-screen bg-[#0A1628]",children:[m.jsx(dF,{}),m.jsx(gM,{}),m.jsx(wM,{}),m.jsx(TM,{}),m.jsx(PM,{}),m.jsx(DM,{}),m.jsx(FM,{}),m.jsx(VM,{}),m.jsx(WM,{}),m.jsx(KM,{}),m.jsx(JM,{}),m.jsx(tF,{}),m.jsx(sF,{}),m.jsx(oF,{}),m.jsx(lF,{}),m.jsx(uF,{})]})}const hF=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:s}=vN();if(t||e)return m.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:m.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return m.jsx(xN,{});if(n.type==="auth_required")return s(),null}return m.jsxs(d_,{children:[m.jsx(vf,{path:"/our-business/project-management/technology",element:m.jsx(fF,{})}),m.jsx(vf,{path:"*",element:m.jsx(gN,{})})]})};function pF(){return m.jsx(yN,{children:m.jsxs(sT,{client:yT,children:[m.jsxs(v_,{children:[m.jsx(bN,{}),m.jsx(hF,{})]}),m.jsx(jk,{})]})})}dC.createRoot(document.getElementById("root")).render(m.jsx(pF,{}));